Skip to content

Commit 7575733

Browse files
authored
fix(build): build vue-compat in default exports mode (#4460)
1 parent 1045590 commit 7575733

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: rollup.config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ function createConfig(format, output, plugins = []) {
8181
process.exit(1)
8282
}
8383

84-
output.exports = 'named'
84+
const isCompatBuild = !!packageOptions.compat
85+
output.exports = isCompatBuild ? 'default' : 'named'
8586
output.sourcemap = !!process.env.SOURCE_MAP
8687
output.externalLiveBindings = false
8788

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

9797
if (isGlobalBuild) {

0 commit comments

Comments
 (0)