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
Hi team,
I try to using repack v4 with Module Federation plugin in sub app but after run webpack bundle size. The output bundle still content shared dependencies (react, react-native).
I research from document Beware, with dynamic scripts there's no dependency sharing by default. If you want your scripts to reuse existing dependencies from the main bundle, it's up to you to figure out how to do it. A good starting point would be: https://webpack.js.org/configuration/externals/ https://webpack.js.org/plugins/dll-plugin/
How to config webpack dll plugin in host app and miniapp to reuse existing dependencies from the host app bundle (react, react-native)
Thanks team.
The text was updated successfully, but these errors were encountered:
Correct me If I'm wrong, but I'm guessing you are talking about the shared dependencies still being present in the output directory of the mini-app despite being declared shared right?
You can add import: false to shared dependency config to prevent that (next to singleton and eager, for each dep). This is like saying: "I never want to use fallback from my app, I always want to rely on the shared dependency present in the host app"
Ask your Question
Hi team,
I try to using repack v4 with Module Federation plugin in sub app but after run webpack bundle size. The output bundle still content shared dependencies (react, react-native).
I research from document
Beware, with dynamic scripts there's no dependency sharing by default. If you want your scripts to reuse existing dependencies from the main bundle, it's up to you to figure out how to do it. A good starting point would be: https://webpack.js.org/configuration/externals/ https://webpack.js.org/plugins/dll-plugin/
How to config webpack dll plugin in host app and miniapp to reuse existing dependencies from the host app bundle (react, react-native)
Thanks team.
The text was updated successfully, but these errors were encountered: