Home / Companies / LogRocket / Blog / Post Details
Content Deep Dive

Improve your webpack build with the DLL plugin

Blog post from LogRocket

Post Details
Company
Date Published
Author
Chisimdiri Ejinkeonye
Word Count
1,257
Language
-
Hacker News Points
-
Summary

For JavaScript developers looking to optimize webpack build times, the tutorial introduces the DLL plugin, which helps by bundling rarely changed modules separately, thus avoiding unnecessary recompilation and drastically reducing build times. By configuring two webpack files, `webpack.vendor.config.js` for static vendor libraries and `webpack.config.js` for frequently modified code, developers can utilize the `DllPlugin` and `DllReferencePlugin` to manage dependencies efficiently. The process involves generating a `vendor-manifest.json` file that maps imports to bundled modules, allowing webpack to skip recompiling unchanged libraries. The tutorial highlights that using the DLL plugin can lead to a significant decrease in build times, as benchmarks show a reduction of up to 95% in the time spent waiting for builds during development sessions, notably increasing productivity. Note that this optimization is specific to development builds and does not impact production builds.