AutomaticPrefetchPlugin

The AutomaticPrefetchPlugin discovers all modules from the previous compilation upfront while watching for changes, trying to improve the incremental build times. Compared to PrefetchPlugin which discovers a single module upfront.

May or may not have a performance benefit since the incremental build times are pretty fast.

webpack.config.js

  1. module.exports = {
  2. // ...
  3. plugins: [
  4. new webpack.AutomaticPrefetchPlugin()
  5. ]
  6. };

贡献人员

EugeneHlushko EugeneHlushko sokra sokra