packageBuilds.forEach(buildName => {
if (buildName === 'cjs') {
packageConfigs.push(createProductionConfig(buildName))
- } else if (buildName === 'global') {
+ } else if (buildName === 'global' || buildName === 'browser') {
packageConfigs.push(createMinifiedConfig(buildName))
}
})
// Global and Browser ESM builds inlines everything so that they can be
// used alone.
external,
+ treeshake: {
+ // Ensure @vue/devtools-api can be treeshaken in production builds
+ moduleSideEffects: false,
+ },
plugins: [
tsPlugin,
createReplacePlugin(
return createConfig(
format,
{
- file: `dist/${name}.${format}.prod.js`,
+ file: outputConfigs[format].file.replace(/.js$/, '.prod.js'),
format: outputConfigs[format].format,
},
[