]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
build: use buildOption to determine runtime compile build (#742)
authorbasvanmeurs <bvanmeurs1985@gmail.com>
Wed, 19 Feb 2020 14:50:24 +0000 (15:50 +0100)
committerGitHub <noreply@github.com>
Wed, 19 Feb 2020 14:50:24 +0000 (09:50 -0500)
This makes it possible to create a separate package that uses runtime compilation.

packages/vue/package.json
rollup.config.js

index e7c67afcd1d353af6268673104e3c67e0cdd0887..97a9b56118c851bafaa26464bfbffca002c79ed4 100644 (file)
@@ -13,6 +13,7 @@
   ],
   "buildOptions": {
     "name": "Vue",
+    "isRuntimeCompileBuild": true,
     "formats": [
       "esm-bundler",
       "esm-bundler-runtime",
index ed3e5cd44cc3b747574ef0fd23d8d46b39287961..b1248ee0d9bf2efa78ebc12f3acbeff530e120bc 100644 (file)
@@ -82,7 +82,7 @@ function createConfig(format, output, plugins = []) {
   const isRawESMBuild = format === 'esm'
   const isNodeBuild = format === 'cjs'
   const isBundlerESMBuild = /esm-bundler/.test(format)
-  const isRuntimeCompileBuild = /vue\./.test(output.file)
+  const isRuntimeCompileBuild = packageOptions.isRuntimeCompileBuild
 
   if (isGlobalBuild) {
     output.name = packageOptions.name