fix(build): build vue-compat in default exports mode (#4460)

This commit is contained in:
Illya Klymov 2021-09-07 18:01:18 +03:00 committed by GitHub
parent 1045590d4b
commit 7575733b8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
@ -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) {