Skip to content

Commit

Permalink
build: add node production/development condition in package exports (#…
Browse files Browse the repository at this point in the history
…10036)

follow up of #9977
  • Loading branch information
yyx990803 authored Jan 11, 2024
1 parent bcda96b commit 92514db
Show file tree
Hide file tree
Showing 10 changed files with 127 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/compiler-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@
"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"
},
"module": "./dist/compiler-core.esm-bundler.js",
"import": "./dist/compiler-core.esm-bundler.js",
"require": "./index.js"
},
"./*": "./*"
},
"buildOptions": {
"name": "VueCompilerCore",
"compat": true,
Expand Down
14 changes: 14 additions & 0 deletions packages/compiler-dom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,20 @@
"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"
},
"module": "./dist/compiler-dom.esm-bundler.js",
"import": "./dist/compiler-dom.esm-bundler.js",
"require": "./index.js"
},
"./*": "./*"
},
"sideEffects": false,
"buildOptions": {
"name": "VueCompilerDOM",
Expand Down
10 changes: 10 additions & 0 deletions packages/compiler-sfc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@
"files": [
"dist"
],
"exports": {
".": {
"types": "./dist/compiler-sfc.d.ts",
"node": "./dist/compiler-sfc.cjs.js",
"module": "./dist/compiler-sfc.esm-browser.js",
"import": "./dist/compiler-sfc.esm-browser.js",
"require": "./dist/compiler-sfc.cjs.js"
},
"./*": "./*"
},
"buildOptions": {
"name": "VueCompilerSFC",
"formats": [
Expand Down
14 changes: 14 additions & 0 deletions packages/reactivity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,20 @@
"index.js",
"dist"
],
"exports": {
".": {
"types": "./dist/reactivity.d.ts",
"node": {
"production": "./dist/reactivity.cjs.prod.js",
"development": "./dist/reactivity.cjs.js",
"default": "./index.js"
},
"module": "./dist/reactivity.esm-bundler.js",
"import": "./dist/reactivity.esm-bundler.js",
"require": "./index.js"
},
"./*": "./*"
},
"sideEffects": false,
"repository": {
"type": "git",
Expand Down
14 changes: 14 additions & 0 deletions packages/runtime-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@
"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"
},
"module": "./dist/runtime-core.esm-bundler.js",
"import": "./dist/runtime-core.esm-bundler.js",
"require": "./index.js"
},
"./*": "./*"
},
"buildOptions": {
"name": "VueRuntimeCore",
"formats": [
Expand Down
14 changes: 14 additions & 0 deletions packages/runtime-dom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,20 @@
"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"
},
"module": "./dist/runtime-dom.esm-bundler.js",
"import": "./dist/runtime-dom.esm-bundler.js",
"require": "./index.js"
},
"./*": "./*"
},
"sideEffects": false,
"buildOptions": {
"name": "VueRuntimeDOM",
Expand Down
14 changes: 14 additions & 0 deletions packages/server-renderer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@
"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"
},
"module": "./dist/server-renderer.esm-bundler.js",
"import": "./dist/server-renderer.esm-bundler.js",
"require": "./index.js"
},
"./*": "./*"
},
"buildOptions": {
"name": "VueServerRenderer",
"formats": [
Expand Down
14 changes: 14 additions & 0 deletions packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@
"index.js",
"dist"
],
"exports": {
".": {
"types": "./dist/shared.d.ts",
"node": {
"production": "./dist/shared.cjs.prod.js",
"development": "./dist/shared.cjs.js",
"default": "./index.js"
},
"module": "./dist/shared.esm-bundler.js",
"import": "./dist/shared.esm-bundler.js",
"require": "./index.js"
},
"./*": "./*"
},
"sideEffects": false,
"buildOptions": {
"formats": [
Expand Down
14 changes: 14 additions & 0 deletions packages/vue-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,20 @@
"index.js",
"dist"
],
"exports": {
".": {
"types": "./dist/vue.d.ts",
"node": {
"production": "./dist/vue.cjs.prod.js",
"development": "./dist/vue.cjs.js",
"default": "./index.js"
},
"module": "./dist/vue.esm-bundler.js",
"import": "./dist/vue.esm-bundler.js",
"require": "./index.js"
},
"./*": "./*"
},
"buildOptions": {
"name": "Vue",
"filename": "vue",
Expand Down
5 changes: 5 additions & 0 deletions packages/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
},
"require": {
"types": "./dist/vue.d.ts",
"node": {
"production": "./dist/vue.cjs.prod.js",
"development": "./dist/vue.cjs.js",
"default": "./index.js"
},
"default": "./index.js"
}
},
Expand Down

0 comments on commit 92514db

Please sign in to comment.