Skip to content

Commit 9ee7234

Browse files
authored
fix(plugin-legacy): use terser as the default minifier (#5168)
1 parent c5bfc5e commit 9ee7234

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

packages/playground/legacy/vite.config.js

-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ module.exports = {
1010
],
1111

1212
build: {
13-
// make tests faster
14-
minify: false,
15-
1613
rollupOptions: {
1714
output: {
1815
chunkFileNames(chunkInfo) {

packages/plugin-legacy/index.js

+8
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,14 @@ function viteLegacyPlugin(options = {}) {
9696
name: 'vite:legacy-generate-polyfill-chunk',
9797
apply: 'build',
9898

99+
config() {
100+
return {
101+
build: {
102+
minify: 'terser'
103+
}
104+
}
105+
},
106+
99107
configResolved(config) {
100108
if (!config.build.ssr && genLegacy && config.build.minify === 'esbuild') {
101109
throw new Error(

0 commit comments

Comments
 (0)