Просмотр исходного кода

build: use buildOption to determine runtime compile build (#742)

This makes it possible to create a separate package that uses runtime compilation.
basvanmeurs 6 лет назад
Родитель
Сommit
8d817bb446
2 измененных файлов с 2 добавлено и 1 удалено
  1. 1 0
      packages/vue/package.json
  2. 1 1
      rollup.config.js

+ 1 - 0
packages/vue/package.json

@@ -13,6 +13,7 @@
   ],
   "buildOptions": {
     "name": "Vue",
+    "isRuntimeCompileBuild": true,
     "formats": [
       "esm-bundler",
       "esm-bundler-runtime",

+ 1 - 1
rollup.config.js

@@ -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