Questions tagged [webpack-module-federation]

458 questions
6
votes
1 answer

How to dynamically load a component in angular via module federation?

I have an angular app where I decided to expose this component: new ModuleFederationPlugin({ // For remotes (please adjust) name: "app1", filename: "app1.js", exposes: { './Heroes':…
Phate
  • 6,066
  • 15
  • 73
  • 138
5
votes
1 answer

How to test a lazy loaded components within the react router?

I need a way to test a component in which two other components are lazy loaded. We are using webpack module federation. So here ComponentOne and ComponentTwo are micro-frontends that are lazy loaded inside the App component. So the App component…
5
votes
1 answer

How solve Shared module is not available for eager consumption typescript react

I have created an application (app1) with the following webpack.config.js: new ModuleFederationPlugin({ name: "app1", filename: "remoteEntry.js", exposes: { "./app1": "./src/components/Sidebar", …
5
votes
2 answers

Webpack module federation lazy loading remoteEntry.js

Am I able to lazy load apps' entry files when I am using React with ReactRouter? When I enter page there are many requests for remoteEntry.js files for each app I have. I do not want to fetch it at the beginning because of performance. I want to…
5
votes
1 answer

Are Webpack 5 Module Federation micro frontends and Nx monorepos mutually exclusive?

I'm investigating micro frontend and monorepo architecture for an Angular 12 project. Webpack 5 recently became production ready and with it, Module Federation, Webpack's solution for micro frontends. With Module Federation we have the concept of…
5
votes
0 answers

How to apply scss with Module federation in Angular

I am working on a module-federation prototype with webpack5 and the Angular 11 using below package. https://www.npmjs.com/package/@angular-architects/module-federation There is a know issue with this package while using styles. Bug with styleUrls…
Hardik Patel
  • 3,868
  • 1
  • 23
  • 37
5
votes
2 answers

Webpack 5 Module Federation : Accessing Remote Module with Authentication

I'm using Webpack 5 Module Federation to consume remote modules. All is working as expected. Until now the remote module URL is public and does not require any kind of authentication. That is fine for dev. purpose. But in production, access to that…
Marc Polizzi
  • 9,275
  • 3
  • 36
  • 61
5
votes
3 answers

"inject() must be called from an injection context" when importing angular app using module federation architecture

I am trying to implement the micro-frontend concept in angular using webpack5 module federation by following this example Module federation with angular, but i am facing this error I tried the solutions provided in this answer inject() must be…
4
votes
1 answer

Can't use Vue 2.7 Composition API with WebPack Module Federation?

Hello to everyone here ! We have 2 apps on the exact same version (Vue 2.7.14) which allow us to use Composition API and