quasar dev build is getting very slow
-
Before I start digging into webpack, does anyone know what “the usual suspects” are when web pack builds are getting slow.
My dev build is reaching 2 min by now!
Thanks.
-
Maybe this can help you: https://play.pixelblaster.ro/blog/2017/03/02/analyse-and-optimize-a-webpack-vuejs-bundle/
-
Almost 100MB of javascript generated… I’d say 100 seconds seems ok.
Either you were inlining many images, or there was some real problem there.
I’m curious how it turned out. -
That’s a lot of javascript!
-
Lots of chunks. Are you using webpack lazy loading a lot or do you simply have lots of pages? For faster download times I do not use the lazy
load
function of the router template for my landing page components, and it reduces the chunks number.Also did you try https://github.com/amireh/happypack ? It reduced my build time a little little bit, but it may be useful to you.
-
And these are MB chunks! Are you using images in
src/assets
? Once turned into base64 by webpack they can get huge in size. -
All my media files are in the statics dir.
Meanwhile I discovered a nasty bug with firebase and webpack. Turns out that webpack is adding the entire firebase.js each time it sees a method call to this package. After ditching firebase my build is now ~ 10Mb.
Nevertheless, my dev build still lasts for about 16 secs now. When I start off with a clean quasar build again , build time starts around 5 secs, but over time (weeks) it increases. Last week it suddenly went from 15 secs to 50 secs, after doing some regular coding. No module installs or anything else. Webpack is becoming very annoying. I can see on google that a lot of people are battling slow build times. I think I’ll lock my self up for a week and start learning webpack from the ground up again. -
I just updated to webpack 3.5.1 build time is now 4 secs.
Seems to work ok with quasar .13.4 -
The webpack guys say they are working on improving build speed (for webpack 3.x) by using different techniques. One example is caching on disk (so that subsequent builds will be faster). Let’s wait and see… I can only hope webpack becomes better and better.