build: fix compat build exports (again)
This commit is contained in:
parent
d534515836
commit
22a9b3711c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user