Can we have an option to disable the chunk optimize assets calls when in development? On my system (desktop/i3/4GB) typical build times exceed 30secs. Now if I go into the Compilation.js and skip the optimize-chunk-assets/after-optimize-chunk-assets calls then I get the bundle ready in a couple of secs.
With the implementations I tried so far I do not see side effects but would like to confirm it.
@sokra I thought I’d share here an one of the performance challenges I ran into with “optimize chunk assets” being triggered in development, which seems pertinent to this issue.
I was seeing 3-4s recompilation times in development mode, getting stuck at the optimize chunk assets step. I was confused why the optimization was even being triggered, as I had no plugins that enabled it (as @enigma1 had).
The issue was that I was using the -d CLI option, which was overriding my “cheap-eval-source-map” setting for devtool in my webpack config file to “source-map”. In turn, the watch process was recreating the sourcemaps every time I made even the smallest change to a file. Recompilation speed drastically improved after removing the -d option.
Why does the “development shortcut” -d specify devtool “source-map” in the first place? It seems to lead to really slow build times in dev mode. Why not have -d equal “–debug –devtool cheap-eval-source-map –output-pathinfo”?
@trzenaro I think this is something youd want to modify in the anglar-cli code.
Take a look at this file, it has a devTools property -> https://github.com/angular/angular-cli/blob/5431abc8457b436e68799f481d0d40c4cdcb29e2/packages/angular-cli/models/webpack-build-development.ts