Skip to content

Commit ed384cf

Browse files
authored
fix: esbuild minification and renderLegacyChunks false (#5054)
1 parent 88f32cc commit ed384cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/plugin-legacy/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ function viteLegacyPlugin(options = {}) {
9797
apply: 'build',
9898

9999
configResolved(config) {
100-
if (!config.build.ssr && config.build.minify === 'esbuild') {
100+
if (!config.build.ssr && genLegacy && config.build.minify === 'esbuild') {
101101
throw new Error(
102102
`Can't use esbuild as the minifier when targeting legacy browsers ` +
103103
`because esbuild minification is not legacy safe.`

0 commit comments

Comments
 (0)