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
The only thing preventing webpack users from using built-in modules in their projects today is that webpack itself doesn't support outputting in module format.
Note: if you're curious, here's a small demo (source code) of a site using built-in modules (via Rollup) and using the above fallbacks so it works in all browsers. In Chrome 74+ (with the experimental web platform features flag turned on), the built-in module is used. In all other browsers a polyfill is loaded.
How should this be implemented in your opinion?
In my opinion, the best way to enable this would be to add full support for ES module output, eliminating the current ES5 runtime code and depending entirely on import statements to load chunks.
But since I assume supporting ES module output would be a lot of work, it would be nice if (at minimum) webpack could be configured to preserve unresolved (or external) module import statements.
I've filed a separate issue for this feature. If support were added, I think it would make it possible (albeit in a slightly hackish way) for webpack users to use built-in modules in their bundles while we wait for proper ES module support.
Are you willing to work on this yourself?
I'm willing to help, but cannot commit to full implementation.
The text was updated successfully, but these errors were encountered: