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
I recently upgraded from Vite 2.x to Vite 4.x, and I can no longer build my project. I think it's due to plugin-legacy changing the target browsers here:
This target leads esbuild to think it needs to transpile async generators (which was usually left to babel). When I run build, it throws this error (from transpiling a dependency): Transforming async generator functions to the configured target environment ("chrome64", "edge79", "es2020", "firefox67", "safari11.1" + 2 overrides) is not supported yet
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 vuejs/core instead.
Unfortunately this is a current limitation of plugin-legacy. This requires #6922 to be implemented to plugin-legacy or async generator transpilation supported by esbuild (evanw/esbuild#2780)
This target leads esbuild to think it needs to transpile async generators (which was usually left to babel).
Previously async generators were transpiled by babel for legacy build. But wasn't transpiled for modern build. This means when accessing with browsers that supports dynamic import but doesn't support async generators your site didn't work. See #10052 (comment), #10072 for more details.
Describe the bug
I recently upgraded from Vite 2.x to Vite 4.x, and I can no longer build my project. I think it's due to plugin-legacy changing the target browsers here:
vite/packages/plugin-legacy/src/index.ts
Lines 187 to 192 in 128f09e
This target leads esbuild to think it needs to transpile async generators (which was usually left to babel). When I run build, it throws this error (from transpiling a dependency):
Transforming async generator functions to the configured target environment ("chrome64", "edge79", "es2020", "firefox67", "safari11.1" + 2 overrides) is not supported yet
Reproduction
https://stackblitz.com/edit/vitejs-vite-wddogq
Steps to reproduce
Run
npm install
and thennpm run build
System Info
Used Package Manager
npm
Logs
Click to expand!
Validations
The text was updated successfully, but these errors were encountered: