Webpack Plugin

Posted Tekkaman

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Webpack Plugin相关的知识,希望对你有一定的参考价值。

Webpack Plugin

  Since Loaders only execute transforms on a per-file basis, plugins are most commonly used (but not limited to) performing actions and custom functionality on "compilations" or "chunks" of your bundled modules (and so much more).

  In order to use a plugin, you just need to require() it and add it to the plugins array.

  Since you can use a plugin multiple times in a config for different purposes, you need to create an instance of it by calling it with new.

  

参考:

1、https://webpack.js.org/concepts/

以上是关于Webpack Plugin的主要内容,如果未能解决你的问题,请参考以下文章

简说webpack plugin

用terser-webpack-plugin替换掉uglifyjs-webpack-plugin解决uglifyjs不支持es6语法问题

webpack优化篇(四十):速度分析:使用 speed-measure-webpack-plugin

webpack之clean-webpack-plugin报错

vue plugin搭建本地服务器配置文件分离webpack

vue plugin搭建本地服务器配置文件分离webpack