From 22a9b3711c70f479421b6caee732ccaf11b3b248 Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 7 Sep 2021 12:38:19 -0400 Subject: [PATCH] build: fix compat build exports (again) --- rollup.config.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rollup.config.js b/rollup.config.js index e07f6bb6371..a8b6ab48527 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -81,11 +81,6 @@ function createConfig(format, output, plugins = []) { process.exit(1) } - const isCompatBuild = !!packageOptions.compat - output.exports = isCompatBuild ? 'default' : 'named' - output.sourcemap = !!process.env.SOURCE_MAP - output.externalLiveBindings = false - const isProductionBuild = process.env.__DEV__ === 'false' || /\.prod\.js$/.test(output.file) const isBundlerESMBuild = /esm-bundler/.test(format) @@ -93,6 +88,11 @@ function createConfig(format, output, plugins = []) { const isNodeBuild = format === 'cjs' const isGlobalBuild = /global/.test(format) const isCompatPackage = pkg.name === '@vue/compat' + const isCompatBuild = !!packageOptions.compat + + output.exports = isCompatPackage ? 'auto' : 'named' + output.sourcemap = !!process.env.SOURCE_MAP + output.externalLiveBindings = false if (isGlobalBuild) { output.name = packageOptions.name