Hi,
I'm running the code with npm run hmr
Every time I make a modification to the code the compiler takes too long to refresh. It get stucked for several seconds in step "92% chunk asset optimization". Productivity is really low. Do you have any idea how to make it faster?
Thanks.
16 Answer(s)
-
0
Hi,
Does it work faster when you run with "npm run" ? Also, which version of angular-cli do you use ?
Thanks.
-
0
-
0
A little bit of more information. I found that with "devtool" configuration you can increase the rebuild speed. But I cannot find where to set it's value.
<a class="postlink" href="https://webpack.js.org/configuration/devtool/">https://webpack.js.org/configuration/devtool/</a>
Thanks, Felix.
-
0
Hi,
Since angular-cli uses webpack internally, we are not allowed to change webpack related stuff. Sorry for my mistake, I was trying to say "npm start" :).
-
0
Hi,
"npm start" does the same thing (takes to long to rebuild).
So, there is nothing we can do? What about "devtool"? As far as I understand, it's a configuration feature, not a change on webpack.
Thanks again.
-
0
Hi,
I'm not sure if we can use <a class="postlink" href="https://webpack.js.org/configuration/devtool/">https://webpack.js.org/configuration/devtool/</a> or not, but since you have soure code you can give it a try.
By the way, which version of AspNet Zero do you use ? We were having same problem at the beginning of angular2 version but then we have fixed it by seperating app to different chunks.
In our development rebuild takes a few seconds.
Thanks.
-
0
Hi,
It's version 3.4.0. At the beginning it wasn't taking that long, but as the project size grows, the rebuild time also grows (a lot).
How did you separated to different chunks?
I hope you can help me, this is really killing productivity.
Thanks.
-
0
Hi,
It seems like we did it in v3.1, so probably you have it. If you don't, I think it is better to search on the net for splitting your app into different chuncks because our commit/work is not going to help you on this.
Also, I personally applied this solution on my pc <a class="postlink" href="http://www.wrapcode.com/improve-angular-cli-build-speed-windows/">http://www.wrapcode.com/improve-angular ... d-windows/</a>.
Thanks.
-
0
Hi,
That "fix" relies on disabling window defender and indexer (wich is not my case). It didn't do anything.
Finally I was able to find where to configure the "devtool" parameter and now rebuild time is really short.
Regards, Felix.
-
0
Thanks for your feedback @felixbeltran.
Can you share how did you configure it ? It might help others as well.
Thanks.
-
0
Hello;
Felix, can you explain where you found the devtool to configure and how you configured it.
Thanks,
Dino
-
0
Thanks for your feedback ;)
-
0
Hi @felixbeltran,
Could you please explain devtool configuration solution.
-
0
@alper @felixbeltran ,
Could you please explain how?
Finally I was able to find where to configure the "devtool" parameter and now rebuild time is really short.
-
0
Hi,
You can try to add --no-sourcemap option to npm start, see <a class="postlink" href="https://github.com/angular/angular-cli/pull/3113#issue-188781779">https://github.com/angular/angular-cli/ ... -188781779</a>.
Just open package.json and replace
"start": "ng serve --host 0.0.0.0 --port 4200"
with
"start": "ng serve --no-sourcemap --host 0.0.0.0 --port 4200"
Also, try to upgrade your angular-cli version if it is old.
-
0
<cite>felixbeltran: </cite> Hi,
I'm running the code with npm run hmr
Every time I make a modification to the code the compiler takes too long to refresh. It get stucked for several seconds in step "92% chunk asset optimization". Productivity is really low. Do you have any idea how to make it faster?
Thanks.
try with yarn. It's work for me
yarn run hmr