News for hackers. Stuff that matters.
Re:Webpack 5 by nicoburns on Saturday October 10, 2020 @06:28PM (#24742321)
I've found that a slightly longer (~100 lines) webpack config allows me to use all the caching and fancy tricks I want and is still just as debuggable. I think the main thing is setting it up yourself so you know what all the plugins/settings do.
Re:Webpack 5 by nwienert on Saturday October 10, 2020 @06:50PM (#24742475)
The key is don’t abstract it. No function builders, one big object with inline conditional spreads.
Re:Webpack 5 by zamber on Sunday October 11, 2020 @03:27PM (#24748339)
Caching was a major dissapointment for me. DllPlugin is a nightmare to setup and other caching plugins I tried don't really speed things up. What eventually worked for me is HardSourceWebpackPlugin [1] - two lines added and went from 2min to 15s (with a tradeoff of a slightly longer initial build).

[1] - https://github.com/mzgoddard/hard-source-webpack-plugin

Re:Webpack 5 by nicoburns on Sunday October 11, 2020 @05:26PM (#24749234)
Not sure on the specifics, but my understanding is that the major improvements in Webpack 5 are related to caching.
Re:Webpack 5 by zamber on Monday October 12, 2020 @05:34AM (#24752772)
I got the same message. Still, having faster builds with one additional plugin without configuration needs on projects locked on 4 or waiting out the transition is a plus in my book :).
Re:Webpack 5 by gremlinsinc on Monday October 12, 2020 @04:44PM (#24759235)
I just use laravel mix, as a wrapper around webpack, and then I can extend that if I need to for certain things, like maybe aliases, or something.