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
Is your feature request related to a problem? Please describe.
Our App unfortunately still has to support IE11. Besides the polyfills that core-js provides we also need some browser polyfills like formdata-polyfill, element-remove, eligrey-classlist.js, whatwg-fetch etc. that are only relevant for IE11. Therefore I'd like these to only be included/executed in IE11.
With Webpack we are currently using a separate entrypoint that only imports the necessary polyfills and adds a nomodule via webpack-nomodule-plugin to the entry in the final html's script tag for this entry.
My naive attempt when migrating this to vite was to just add a nomodule script into the index.html file, but it is not picked up (I guess because vite only considers script type="module")
<scriptnomodulesrc="/src/Polyfills.ts"></script>
Describe the solution you'd like
I would like to have an option additionalLegacyPolyfills in @vitejs/plugin-legacy where I can specify a set of npm packages that should be bundled into polyfills-legacy.js in addition to the automatically detected core-js polyfills that are needed to run the code:
Is your feature request related to a problem? Please describe.
Our App unfortunately still has to support IE11. Besides the polyfills that core-js provides we also need some browser polyfills like formdata-polyfill, element-remove, eligrey-classlist.js, whatwg-fetch etc. that are only relevant for IE11. Therefore I'd like these to only be included/executed in IE11.
With Webpack we are currently using a separate entrypoint that only imports the necessary polyfills and adds a
nomodule
viawebpack-nomodule-plugin
to the entry in the final html's script tag for this entry.My naive attempt when migrating this to vite was to just add a nomodule script into the
index.html
file, but it is not picked up (I guess because vite only considers script type="module")Describe the solution you'd like
I would like to have an option
additionalLegacyPolyfills
in@vitejs/plugin-legacy
where I can specify a set of npm packages that should be bundled intopolyfills-legacy.js
in addition to the automatically detected core-js polyfills that are needed to run the code:Describe alternatives you've considered
Another option would be to just add support for nomodule script tags (see my initial attempt).
The text was updated successfully, but these errors were encountered: