Skip to content

Commit

Permalink
fix: esbuild minification and renderLegacyChunks false (#5054)
Browse files Browse the repository at this point in the history
  • Loading branch information
DreierF authored Sep 23, 2021
1 parent 88f32cc commit ed384cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/plugin-legacy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function viteLegacyPlugin(options = {}) {
apply: 'build',

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

0 comments on commit ed384cf

Please sign in to comment.