Description
plugin-legacy has been using terser for minification regardless of the value of build.minify because esbuild didn't support keeping the syntax as-is. Now that Oxc supports that, we can respect build.minify: 'oxc' and build.minify: true for it.
Suggested solution
Remove this line as some other places
|
minify = minify ? 'terser' : false |
We should make sure to add build.rolldownOptions.output.minify.compress.target.
Alternative
No response
Additional context
Originally suggested in #21858
Validations
Description
plugin-legacy has been using terser for minification regardless of the value of
build.minifybecause esbuild didn't support keeping the syntax as-is. Now that Oxc supports that, we can respectbuild.minify: 'oxc'andbuild.minify: truefor it.Suggested solution
Remove this line as some other places
vite/packages/plugin-legacy/src/index.ts
Line 848 in c2d17bd
We should make sure to add
build.rolldownOptions.output.minify.compress.target.Alternative
No response
Additional context
Originally suggested in #21858
Validations