Skip to content

Commit

Permalink
fix(build): build vue-compat in default exports mode (#4460)
Browse files Browse the repository at this point in the history
  • Loading branch information
xanf committed Sep 7, 2021
1 parent 1045590 commit 7575733
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rollup.config.js
Expand Up @@ -81,7 +81,8 @@ function createConfig(format, output, plugins = []) {
process.exit(1)
}

output.exports = 'named'
const isCompatBuild = !!packageOptions.compat
output.exports = isCompatBuild ? 'default' : 'named'
output.sourcemap = !!process.env.SOURCE_MAP
output.externalLiveBindings = false

Expand All @@ -91,7 +92,6 @@ function createConfig(format, output, plugins = []) {
const isBrowserESMBuild = /esm-browser/.test(format)
const isNodeBuild = format === 'cjs'
const isGlobalBuild = /global/.test(format)
const isCompatBuild = !!packageOptions.compat
const isCompatPackage = pkg.name === '@vue/compat'

if (isGlobalBuild) {
Expand Down

0 comments on commit 7575733

Please sign in to comment.