We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5cb02ce commit 8fb2511Copy full SHA for 8fb2511
packages/plugin-legacy/index.js
@@ -69,6 +69,15 @@ function viteLegacyPlugin(options = {}) {
69
name: 'legacy-generate-polyfill-chunk',
70
apply: 'build',
71
72
+ configResolved(config) {
73
+ if (config.build.minify === 'esbuild') {
74
+ throw new Error(
75
+ `Can't use esbuild as the minifier when targeting legacy browsers ` +
76
+ `because esbuild minification is not legacy safe.`
77
+ )
78
+ }
79
+ },
80
+
81
async generateBundle(opts, bundle) {
82
if (!isLegacyOutput(opts)) {
83
if (!modernPolyfills.size) {
0 commit comments