Skip to content

Commit

Permalink
build: add production/development export conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Jan 3, 2024
1 parent f70f7ca commit 7010af2
Show file tree
Hide file tree
Showing 10 changed files with 118 additions and 1 deletion.
13 changes: 13 additions & 0 deletions packages/compiler-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,19 @@
"index.js",
"dist"
],
"exports": {
".": {
"types": "./dist/compiler-core.d.ts",
"node": {
"production": "./dist/compiler-core.cjs.prod.js",
"development": "./dist/compiler-core.cjs.js",
"default": "./index.js"
},
"import": "./dist/compiler-core.esm-bundler.js",
"require": "./index.js"
},
"./*": "./*"
},
"buildOptions": {
"name": "VueCompilerCore",
"compat": true,
Expand Down
13 changes: 13 additions & 0 deletions packages/compiler-dom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@
"index.js",
"dist"
],
"exports": {
".": {
"types": "./dist/compiler-dom.d.ts",
"node": {
"production": "./dist/compiler-dom.cjs.prod.js",
"development": "./dist/compiler-dom.cjs.js",
"default": "./index.js"
},
"import": "./dist/compiler-dom.esm-bundler.js",
"require": "./index.js"
},
"./*": "./*"
},
"sideEffects": false,
"buildOptions": {
"name": "VueCompilerDOM",
Expand Down
9 changes: 9 additions & 0 deletions packages/compiler-sfc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@
"files": [
"dist"
],
"exports": {
".": {
"types": "./dist/compiler-sfc.d.ts",
"node": "./dist/compiler-sfc.cjs.js",
"import": "./dist/compiler-sfc.esm-browser.js",
"require": "./dist/compiler-sfc.cjs.js"
},
"./*": "./*"
},
"buildOptions": {
"name": "VueCompilerSFC",
"formats": [
Expand Down
13 changes: 13 additions & 0 deletions packages/reactivity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@
"index.js",
"dist"
],
"exports": {
".": {
"types": "./dist/reactivity.d.ts",
"node": {
"production": "./dist/reactivity.cjs.prod.js",
"development": "./dist/reactivity.cjs.js",
"default": "./index.js"
},
"import": "./dist/reactivity.esm-bundler.js",
"require": "./index.js"
},
"./*": "./*"
},
"sideEffects": false,
"repository": {
"type": "git",
Expand Down
13 changes: 13 additions & 0 deletions packages/runtime-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,19 @@
"index.js",
"dist"
],
"exports": {
".": {
"types": "./dist/runtime-core.d.ts",
"node": {
"production": "./dist/runtime-core.cjs.prod.js",
"development": "./dist/runtime-core.cjs.js",
"default": "./index.js"
},
"import": "./dist/runtime-core.esm-bundler.js",
"require": "./index.js"
},
"./*": "./*"
},
"buildOptions": {
"name": "VueRuntimeCore",
"formats": [
Expand Down
13 changes: 13 additions & 0 deletions packages/runtime-dom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@
"index.js",
"dist"
],
"exports": {
".": {
"types": "./dist/runtime-dom.d.ts",
"node": {
"production": "./dist/runtime-dom.cjs.prod.js",
"development": "./dist/runtime-dom.cjs.js",
"default": "./index.js"
},
"import": "./dist/runtime-dom.esm-bundler.js",
"require": "./index.js"
},
"./*": "./*"
},
"sideEffects": false,
"buildOptions": {
"name": "VueRuntimeDOM",
Expand Down
13 changes: 13 additions & 0 deletions packages/server-renderer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,19 @@
"index.js",
"dist"
],
"exports": {
".": {
"types": "./dist/server-renderer.d.ts",
"node": {
"production": "./dist/server-renderer.cjs.prod.js",
"development": "./dist/server-renderer.cjs.js",
"default": "./index.js"
},
"import": "./dist/server-renderer.esm-bundler.js",
"require": "./index.js"
},
"./*": "./*"
},
"buildOptions": {
"name": "VueServerRenderer",
"formats": [
Expand Down
13 changes: 13 additions & 0 deletions packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,19 @@
"index.js",
"dist"
],
"exports": {
".": {
"types": "./dist/shared.d.ts",
"node": {
"production": "./dist/shared.cjs.prod.js",
"development": "./dist/shared.cjs.js",
"default": "./index.js"
},
"import": "./dist/shared.esm-bundler.js",
"require": "./index.js"
},
"./*": "./*"
},
"sideEffects": false,
"buildOptions": {
"formats": [
Expand Down
13 changes: 13 additions & 0 deletions packages/vue-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@
"index.js",
"dist"
],
"exports": {
".": {
"types": "./dist/vue.d.ts",
"node": {
"production": "./dist/vue.cjs.prod.js",
"development": "./dist/vue.cjs.js",
"default": "./index.js"
},
"import": "./dist/vue.esm-bundler.js",
"require": "./index.js"
},
"./*": "./*"
},
"buildOptions": {
"name": "Vue",
"filename": "vue",
Expand Down
6 changes: 5 additions & 1 deletion packages/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@
".": {
"import": {
"types": "./dist/vue.d.mts",
"node": "./index.mjs",
"node": {
"production": "./dist/vue.cjs.prod.js",
"development": "./dist/vue.cjs.js",
"default": "./index.mjs"
},
"default": "./dist/vue.runtime.esm-bundler.js"
},
"require": {
Expand Down

0 comments on commit 7010af2

Please sign in to comment.