Skip to content

Commit

Permalink
build: use buildOption to determine runtime compile build (#742)
Browse files Browse the repository at this point in the history
This makes it possible to create a separate package that uses runtime compilation.
  • Loading branch information
basvanmeurs authored Feb 19, 2020
1 parent 7b987d9 commit 8d817bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
],
"buildOptions": {
"name": "Vue",
"isRuntimeCompileBuild": true,
"formats": [
"esm-bundler",
"esm-bundler-runtime",
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8d817bb

Please sign in to comment.