[vite-plugin-federation] Consume federated modules from Webpack 4? #141
-
Anyone done something like a federated module exported from vite-plugin-federation and consumed it in a webpack 4 app? I know in WP4 it does not support module federation natively so you would have to import a script at runtime, i've seen this done when federating with webpack 5. To clarify Host = webpack4 app and Remote = vite with vite-plugin-federation. Is this even possible with this vite plugin since the output is |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I figured it out, just need to change the rollup output format to |
Beta Was this translation helpful? Give feedback.
I figured it out, just need to change the rollup output format to
es
then you can async load theremoteEntry.js
and instantiate a module from the returned code.