File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 44
55For a general introduction see: https://webpack.js.org/concepts/module-federation/
66
7- Module Federation allows to share dependencies between bundles.
7+ Module Federation allows to share dependencies between bundles.
88Each bundle includes the whole set of dependencies.
99However, if multiple bundles have the same dependencies they are only loaded once.
1010
@@ -18,7 +18,15 @@ Other bundles are "remotes" which are initialized for module federation by the h
1818## How to use it
1919
2020- Create a new entry point `` index.js `` which only imports the normal entry point.
21- If your bundle is the host bundle, also import the `` module_federation `` module - importing is enough.
21+
22+ ```
23+ import("./patterns");
24+ ```
25+
26+ If you are creating a host bundle - one which is always present and initializes add-on bundles - then also import the `` module_federation `` module.
27+ Importing is enough.
28+ Mockup is such a host bundle.
29+ Your `` index.js `` will then look like:
2230
2331```
2432import "@patternslib/patternslib/webpack/module_federation";
You can’t perform that action at this time.
0 commit comments