From 8d817bb4460e7654b58596ba1711ed0ccac96b60 Mon Sep 17 00:00:00 2001 From: basvanmeurs Date: Wed, 19 Feb 2020 15:50:24 +0100 Subject: [PATCH] build: use buildOption to determine runtime compile build (#742) This makes it possible to create a separate package that uses runtime compilation. --- packages/vue/package.json | 1 + rollup.config.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/vue/package.json b/packages/vue/package.json index e7c67afcd1d..97a9b56118c 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -13,6 +13,7 @@ ], "buildOptions": { "name": "Vue", + "isRuntimeCompileBuild": true, "formats": [ "esm-bundler", "esm-bundler-runtime", diff --git a/rollup.config.js b/rollup.config.js index ed3e5cd44cc..b1248ee0d9b 100644 --- a/rollup.config.js +++ b/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