diff --git a/packages/playground/legacy/vite.config.js b/packages/playground/legacy/vite.config.js index a8fc762cd501a4..e6a7697413c8f9 100644 --- a/packages/playground/legacy/vite.config.js +++ b/packages/playground/legacy/vite.config.js @@ -11,8 +11,6 @@ module.exports = { build: { // make tests faster - minify: false, - rollupOptions: { output: { chunkFileNames(chunkInfo) { diff --git a/packages/plugin-legacy/index.js b/packages/plugin-legacy/index.js index 60f7f4a227ff03..f88b77c5f6a33e 100644 --- a/packages/plugin-legacy/index.js +++ b/packages/plugin-legacy/index.js @@ -96,6 +96,14 @@ function viteLegacyPlugin(options = {}) { name: 'vite:legacy-generate-polyfill-chunk', apply: 'build', + config() { + return { + build: { + minify: 'terser' + } + } + }, + configResolved(config) { if (!config.build.ssr && genLegacy && config.build.minify === 'esbuild') { throw new Error(