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
Webpack has a long open issue, webpack/webpack#11874, where the output of top level await modules contain async functions, making them incompatible with older browsers that do not support them. It looks like RSPack inherited this same problem.
I wrote a plugin, transform-async-modules-plugin, which taps into the renderModuleContent hook of JavascriptModulesPlugin, and transpiles those per the browser targets. This plugin is not able to be made compatible because JavascriptModulesPlugin.getCompilationHooks() only returns one of the many hooks available in Webpack. I submitted #8678 to fix this in the docs.
So the question is: can RSPack be made to support all the hooks available in JavascriptModulesPlugin (or at least the one I need)? If so, I can file a feature request for that. If there's a better solution, I guess RSPack should just inherit the same issue as Webpack.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Webpack has a long open issue, webpack/webpack#11874, where the output of top level await modules contain async functions, making them incompatible with older browsers that do not support them. It looks like RSPack inherited this same problem.
I wrote a plugin,
transform-async-modules-plugin
, which taps into therenderModuleContent
hook ofJavascriptModulesPlugin
, and transpiles those per the browser targets. This plugin is not able to be made compatible becauseJavascriptModulesPlugin.getCompilationHooks()
only returns one of the many hooks available in Webpack. I submitted #8678 to fix this in the docs.So the question is: can RSPack be made to support all the hooks available in
JavascriptModulesPlugin
(or at least the one I need)? If so, I can file a feature request for that. If there's a better solution, I guess RSPack should just inherit the same issue as Webpack.Beta Was this translation helpful? Give feedback.
All reactions