You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error during build:
Error: Can't use esbuild as the minifier when targeting legacy browsers because esbuild minification is not legacy safe. at Object.configResolved (/home/tjk/src/github.com/tjk/vite-plugin-legacy-esbuild-issue/node_modules/.pnpm/@vitejs+plugin-legacy@1.6.0_vite@2.6.2/node_modules/@vitejs/plugin-legacy/index.js:101:15) at /home/tjk/src/github.com/tjk/vite-plugin-legacy-esbuild-issue/node_modules/.pnpm/vite@2.6.2_fa61c471ed365d086e71b610b15aabb9/node_modules/vite/dist/node/chunks/dep-24231913.js:76446:127 at Array.map (<anonymous>) at resolveConfig (/home/tjk/src/github.com/tjk/vite-plugin-legacy-esbuild-issue/node_modules/.pnpm/vite@2.6.2_fa61c471ed365d086e71b610b15aabb9/node_modules/vite/dist/node/chunks/dep-24231913.js:76446:35) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async doBuild (/home/tjk/src/github.com/tjk/vite-plugin-legacy-esbuild-issue/node_modules/.pnpm/vite@2.6.2_fa61c471ed365d086e71b610b15aabb9/node_modules/vite/dist/node/chunks/dep-24231913.js:51168:20) at async build (/home/tjk/src/github.com/tjk/vite-plugin-legacy-esbuild-issue/node_modules/.pnpm/vite@2.6.2_fa61c471ed365d086e71b610b15aabb9/node_modules/vite/dist/node/chunks/dep-24231913.js:51156:16) at async CAC.<anonymous> (/home/tjk/src/github.com/tjk/vite-plugin-legacy-esbuild-issue/node_modules/.pnpm/vite@2.6.2_fa61c471ed365d086e71b610b15aabb9/node_modules/vite/dist/node/cli.js:740:9)
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
Describe the bug
Please see repro -- should be well explained there. It looks like the legacy polyfill chunks use terser for minification in all cases (https://github.com/vitejs/vite/blob/main/packages/plugin-legacy/index.js#L542) but I'm not sure if it still requires rest of files to NOT use esbuild? (bails in
configResolved
: https://github.com/vitejs/vite/blob/main/packages/plugin-legacy/index.js#L101)Hopefully can still benefit from esbuild minification, but if not -- should update documentation and perhaps label a breaking change somewhere?
Reproduction
https://github.com/tjk/vite-plugin-legacy-esbuild-issue
System Info
Used Package Manager
pnpm
Logs
Validations
The text was updated successfully, but these errors were encountered: