]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
build: adjust global names + allow inline overrides of build flags
authorEvan You <yyx990803@gmail.com>
Sun, 15 Dec 2019 20:37:43 +0000 (15:37 -0500)
committerEvan You <yyx990803@gmail.com>
Sun, 15 Dec 2019 20:37:43 +0000 (15:37 -0500)
packages/compiler-core/package.json
packages/compiler-dom/package.json
packages/reactivity/package.json
packages/runtime-core/package.json
packages/runtime-dom/package.json
packages/runtime-test/package.json
rollup.config.js

index 5f6311730aa75724b4ee4527e79f1e608046ae19..ef6ab9ad6046b59ca459a9e292019701f5b2a1dc 100644 (file)
@@ -10,6 +10,7 @@
   ],
   "types": "dist/compiler-core.d.ts",
   "buildOptions": {
+    "name": "VueCompilerCore",
     "formats": [
       "esm-bundler",
       "cjs"
index 30d69ae7e55c2dfbf898daa742d909c5a6f230d1..83c5c7c762162099ab90c0e4389712ca0f164cf7 100644 (file)
@@ -12,7 +12,7 @@
   "unpkg": "dist/compiler-dom/global.js",
   "sideEffects": false,
   "buildOptions": {
-    "name": "VueDOMCompiler",
+    "name": "VueCompilerDOM",
     "formats": [
       "esm-bundler",
       "cjs",
index 9a6eec0a1dcbd69ebdbc6f1f1ebe1b2bea7c4b79..1613b0351b52e80bdc0cb4f6ab80da788fcb27e4 100644 (file)
@@ -16,7 +16,7 @@
     "url": "git+https://github.com/vuejs/vue.git"
   },
   "buildOptions": {
-    "name": "VueObserver",
+    "name": "VueReactivity",
     "formats": [
       "esm-bundler",
       "cjs",
index deccfd3e0e2418f2d22f1f9a59066eeee4aa2e00..db5e28d0b7344a0d816d9d9ecc5b0031f1def08d 100644 (file)
@@ -10,6 +10,7 @@
   ],
   "types": "dist/runtime-core.d.ts",
   "buildOptions": {
+    "name": "VueRuntimeCore",
     "formats": [
       "esm-bundler",
       "cjs"
index 6efbad1ce2f3db5f7eba7b0cd03efc249546105d..49e45f64e69f88e5b52545c02aec31c94ab2a719 100644 (file)
@@ -12,7 +12,7 @@
   "unpkg": "dist/runtime-dom.global.js",
   "sideEffects": false,
   "buildOptions": {
-    "name": "VueDOMRuntime",
+    "name": "VueRuntimeDOM",
     "formats": [
       "esm-bundler",
       "cjs",
index 0a35d5ae12df2f26b4c28a369964453765940342..7ae947d28ace02f5752000beb7cb959547783f16 100644 (file)
@@ -15,7 +15,7 @@
     "url": "git+https://github.com/vuejs/vue.git"
   },
   "buildOptions": {
-    "name": "VueTestRuntime",
+    "name": "VueRuntimeTest",
     "formats": [
       "global"
     ]
index fb6f23d8f07ba5cbd6d0e2892bb5db2cd21e6389..81971c33e4376f0534dbd3c22eebbfa1a42d95ed 100644 (file)
@@ -135,7 +135,7 @@ function createReplacePlugin(
   isBrowserBuild,
   isRuntimeCompileBuild
 ) {
-  return replace({
+  const replacements = {
     __COMMIT__: `"${process.env.COMMIT}"`,
     __VERSION__: `"${masterVersion}"`,
     __DEV__: isBundlerESMBuild
@@ -155,7 +155,15 @@ function createReplacePlugin(
     // the lean build drops options related code with buildOptions.lean: true
     __FEATURE_OPTIONS__: !packageOptions.lean && !process.env.LEAN,
     __FEATURE_SUSPENSE__: true
+  }
+  // allow inline overrides like
+  //__RUNTIME_COMPILE__=true yarn build runtime-core
+  Object.keys(replacements).forEach(key => {
+    if (key in process.env) {
+      replacements[key] = process.env[key]
+    }
   })
+  return replace(replacements)
 }
 
 function createProductionConfig(format) {