-
-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Build): Use dynamic module federation.
- Loading branch information
Showing
4 changed files
with
38 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,22 @@ | ||
// Webpack entry point for module federation. | ||
/** | ||
* Module Federation support for Mockup. | ||
* | ||
* In this module federation setup Mockup is the main host, which loads other | ||
* "remote" bundles. | ||
* | ||
* Those remotes need to be registered via the Patternslib's Webpack Module | ||
* Federation helper, just like Mockup itself (See Mockup's webpack.config.js). | ||
* Patternslib' Module Federation helper registers the bundle under a prefix | ||
* (``MF_NAME_PREFIX``) in the global namespace. | ||
* | ||
* Here, we filter for all the globally registered bundles with this prefix and | ||
* load them. | ||
* | ||
* Note: loading in this context only means that the module federation | ||
* functionality for each bundle is initialized. | ||
* | ||
*/ | ||
import "@patternslib/patternslib/webpack/module_federation"; | ||
|
||
// And now load this bundle's actual entry point. | ||
import("./patterns"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters