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
But I don't understand why this is needed, because I found that regenerator-runtime will still be included in polyfills-legacy.xxx.js even if I don't add it with additionalLegacyPolyfills , I tried a minimal reproduction:
here is the main.js:
I use async in code, let babel useBuiltIns usage to import renerator-runtime/runtime.js
here is the vite.config.js:
Notice I do not manualy add regenerator-runtime by additionalLegacyPolyfills
and try debug in @vitejs/plugin-legacy source code:
Now run yarn build:
here the regenerator-runtime was auto-detection added by babel
and see the output polyfills-legacy.xxx.js:
I think the regenerator-runtime has been successfully added.
So I'm comfused about why the docs says should need regenerator-runtime when targeting IE11, is this a description error?
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/core instead.
Describe the bug
I found the docs says:
The associated issue is:#3362
But I don't understand why this is needed, because I found that
regenerator-runtime
will still be included inpolyfills-legacy.xxx.js
even if I don't add it withadditionalLegacyPolyfills
, I tried a minimal reproduction:here is the
main.js
:I use
async
in code, let babeluseBuiltIns usage
to importrenerator-runtime/runtime.js
here is the
vite.config.js
:Notice I do not manualy add
regenerator-runtime
byadditionalLegacyPolyfills
and try debug in
@vitejs/plugin-legacy
source code:Now run
yarn build
:here the
regenerator-runtime
was auto-detection added by babeland see the output
polyfills-legacy.xxx.js
:I think the
regenerator-runtime
has been successfully added.So I'm comfused about why the docs says should need regenerator-runtime when targeting IE11, is this a description error?
Thanks all
Reproduction
https://stackblitz.com/edit/vitejs-vite-zreonp?file=vite.config.js&terminal=dev
System Info
Used Package Manager
yarn
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: