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.
Currently, vite requires native ES module support in browsers for both development and production build(dynamic imports polyfill also requires native ES module support). I know vite is for modern browsers, but it would be a great help if we provide an option to allow vite to build for production without requiring native ES module support by using System.js. In the meantime, vite still requires native ES support in the development, so we won't lose any development experience.
Describe the solution you'd like
There should be something like {disableEsModule?: boolean} in vite config, and when disableEsModule is true, we can simply change the target of rollup from es to system, and insert the System.js runtime before other javascript tags in the HTML. I guess it would be easy to implement and won't break any other functionalities of vite.
The text was updated successfully, but these errors were encountered:
It seems, currently, many are using custom Rollup builds for production (including me), while benefiting from Vite in development.
Let me know if you want help on that. I am not sure whether Vite wants to be a generic bundler (not for me to judge). Maybe the abilities to inject custom Rollup options can be used to make this happen.
Is your feature request related to a problem? Please describe.
Currently, vite requires native ES module support in browsers for both development and production build(dynamic imports polyfill also requires native ES module support). I know vite is for modern browsers, but it would be a great help if we provide an option to allow vite to build for production without requiring native ES module support by using System.js. In the meantime, vite still requires native ES support in the development, so we won't lose any development experience.
Describe the solution you'd like
There should be something like {disableEsModule?: boolean} in vite config, and when disableEsModule is true, we can simply change the target of rollup from es to system, and insert the System.js runtime before other javascript tags in the HTML. I guess it would be easy to implement and won't break any other functionalities of vite.
The text was updated successfully, but these errors were encountered: