Prefetch normal module requests, causing them to be resolved and built before the first import
or require
of that module occurs. Using this plugin can boost performance. Try to profile the build first to determine clever prefetching points.
new webpack.PrefetchPlugin([context], request);
context
: An absolute path to a directoryrequest
: A request string for a normal moduleWebpack 5 现已正式发布。请阅读我们的 发布公告。如还未准备升级,请阅读 webpack 4 文档。