0

I have recently gained an interest in developing microfrontends using module-federation, and I have started converting an existing Angular 13 app to microfrontend. The issue that I'm facing is that when I install module-federation, the default builder for the microfrontend is ngx-build-plus. However, my existing app is built using angular-devkit. I also read that webpack supports only ngx-build. Is there a way for me to find a workaround for this? I need to use angular-devkit since the project I'm working on is pretty big and can't be converted to ngx-build.

Thanks!

  • 1
    What do you mean with “when I install module-federation, the default builder for the microfrontend is ngx-build-plus”? What is that install exactly? – MikeOne Jul 20 '22 at 22:25
  • The webpack.config,js files get generated when I do "npm install @angular-architects/module-federation". By default, ngx-build-plus is used as builder for the webpack components. I need to use Angular-devkit. – Divya Vijayakumar Jul 21 '22 at 15:50
  • Ah right. I'm using that same package - however, I'm also using Nx so it's using a custom builder there (@nrwl/angular:webpack-browser). I'm not sure if it is possible to use custom webpack configs with just the angular devkit. I think the recommended way is to use the angular-builders package (https://github.com/just-jeb/angular-builders/tree/13.x.x/packages/custom-webpack) - which under the hood simply extends angular devkit. – MikeOne Jul 21 '22 at 18:10
  • Thanks! I'll definitely look into this. – Divya Vijayakumar Jul 22 '22 at 23:32

0 Answers0