PWA cannot be configured with the Module Federation
See original GitHub issueIf the application is setup to use the module federation, the bootstrap section of the application is shifted out of the main.ts
file into a bootstrap.ts
file (https://github.com/angular-architects/module-federation-plugin)
main.ts (in it’s entirety):
import('./bootstrap').catch((err) => console.error(err));
The following function findBootstrapModuleCall
doesn’t look into any nested import
statements and returns with the error Bootstrap call not found
when running ng add @angular/pwa --project myProject
:
https://github.com/angular/angular-cli/blob/d05559795487095d1b85f27a8159e4adde7b848a/packages/schematics/angular/utility/ng-ast-utils.ts#L54
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:5 (1 by maintainers)
Top Results From Across the Web
PWA for React Micro-Frontend (Module Federation) application
I've setup service workers in both the applications, but given that the service workers of both host and remote apps cannot be registered...
Read more >Module Federation and Angular Service Workers (PWA) - Bitovi
Using Service Workers on an application that implements Module Federation ensures you have a 100% uptime for all your Remote Containers. Meaning ...
Read more >How to Use Module Federation with Re.Pack 3 | blog {callstack}
Going through the properties in the Module Federation plugin config, we can find the same ones in all of the apps. The name...
Read more >@angular-architects/module-federation - npm
Module Federation allows loading separately compiled and deployed code (like micro frontends or plugins) into an application.
Read more >Webpack 5 Module Federation: A game-changer in JavaScript ...
Let us start out with three standalone applications. App One. Configuration: I'm going to use the app container <App> from App One. It...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The Angular PWA schematic is intended to be used with the official builders. Third party tooling can easily extend the schematic functionality and customize it as needed.
The non standard bootstrapping is required by 3rd party builders to use Webpack’s specific features. Both of which are not supported by the Angular team. Please note that Webpack is to be considered an implementation detail in the CLI that can be replaced in the future.
Please have a look here: https://github.com/angular-architects/module-federation-plugin/issues/93