Skip to content

Commit

Permalink
build: upgrade to unbuild v2
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Aug 22, 2023
1 parent 347a88b commit 27f2cc4
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 320 deletions.
2 changes: 1 addition & 1 deletion build.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default defineBuildConfig({
entries: [
"src/index",
"src/config",
"src/cli/cli",
"src/cli/index",
{ input: "src/runtime/", outDir: "dist/runtime", format: "esm" },
],
externals: ["@nuxt/schema", "firebase-functions"],
Expand Down
25 changes: 17 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,28 @@
"import": "./dist/index.mjs"
},
"./config": {
"types": "./dist/config.d.ts",
"types": "./dist/config.d.mts",
"import": "./dist/config.mjs"
},
"./cli": "./dist/cli.mjs",
"./runtime/*": "./dist/runtime/*.mjs",
"./dist/runtime/*": "./dist/runtime/*.mjs",
"./cli": {
"types": "./dist/cli/index.d.mts",
"import": "./dist/cli/index.mjs"
},
"./runtime/*": {
"types": "./dist/runtime/*.d.mts",
"import": "./dist/runtime/*.mjs"
},
"./dist/runtime/*": {
"types": "./dist/runtime/*.d.mts",
"import": "./dist/runtime/*.mjs"
},
"./package.json": "./package.json"
},
"main": "./dist/index.mjs",
"types": "./types.d.ts",
"bin": {
"nitro": "./dist/cli.mjs",
"nitropack": "./dist/cli.mjs"
"nitro": "./dist/cli/index.mjs",
"nitropack": "./dist/cli/index.mjs"
},
"files": [
"dist",
Expand All @@ -36,7 +45,7 @@
"dev:start": "node playground/.output/server/index.mjs",
"lint": "eslint --cache --ext .ts,.mjs,.cjs . && prettier -c src test",
"lint:fix": "eslint --cache --fix --ext .ts,.mjs,.cjs . && prettier --write -c src test",
"nitro": "NODE_OPTIONS=\"--enable-source-maps\" jiti ./src/cli/cli.ts",
"nitro": "NODE_OPTIONS=\"--enable-source-maps\" jiti ./src/cli/index.ts",
"prepack": "pnpm build",
"release": "pnpm test && pnpm build && changelogen --release && pnpm publish && git push --follow-tags",
"stub": "unbuild --stub",
Expand Down Expand Up @@ -136,7 +145,7 @@
"miniflare": "^2.14.0",
"prettier": "^3.0.2",
"typescript": "^5.1.6",
"unbuild": "^1.2.1",
"unbuild": "^2.0.0",
"undici": "^5.23.0",
"vitest": "^0.34.2"
},
Expand Down

0 comments on commit 27f2cc4

Please sign in to comment.