Skip to content

Commit 22a9b37

Browse files
committed
build: fix compat build exports (again)
1 parent d534515 commit 22a9b37

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

rollup.config.js

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

84-
const isCompatBuild = !!packageOptions.compat
85-
output.exports = isCompatBuild ? 'default' : 'named'
86-
output.sourcemap = !!process.env.SOURCE_MAP
87-
output.externalLiveBindings = false
88-
8984
const isProductionBuild =
9085
process.env.__DEV__ === 'false' || /\.prod\.js$/.test(output.file)
9186
const isBundlerESMBuild = /esm-bundler/.test(format)
9287
const isBrowserESMBuild = /esm-browser/.test(format)
9388
const isNodeBuild = format === 'cjs'
9489
const isGlobalBuild = /global/.test(format)
9590
const isCompatPackage = pkg.name === '@vue/compat'
91+
const isCompatBuild = !!packageOptions.compat
92+
93+
output.exports = isCompatPackage ? 'auto' : 'named'
94+
output.sourcemap = !!process.env.SOURCE_MAP
95+
output.externalLiveBindings = false
9696

9797
if (isGlobalBuild) {
9898
output.name = packageOptions.name

0 commit comments

Comments
 (0)