Closed raphael22 closed 2 years ago
I have the same issue with the polyfills, a simple app will result in a large bundle because of this. The problem is, if you don't have your shared deps added eagerly, you will have to change your app bootstrap. I didn't find a solution yet, but I guess that in Angular, we have to set eager to true for now.
But why is webpack adding everything in main.js and polyfills?
@nohanna Good news ! I finally find a solution to make it work with eager: false.
As indicate here I switch from static bootstrap import:
import "./bootstrap";
to dynamic one:
import('./bootstrap');
Making the final build working with only one copy of deps instead of two. Still struggling to make it work without eager or to bundle some deps to avoid having one endpoint per deps thought.
Hello there. I notice that webpack bundle shared dependencies into main.js but also in polyfills.js : Resulting a 800kb build.
The way to go would be to set eager to false then ? Down the build half size.
But we get the eager error
I'm struggle a bit to find the good configuration for having both world, a shell which consume and expose singleton deps.