本文目的,实现一个可以移除项目中 console.log 的 webpack 插件。 本来以为比较简单,但还是花了我一个上午的时间。 首先,我们需要初始化环境 yarn init -y yarn add webpack webpack-cli -D 复制代码 webpack.config.js 配置如下: module.exports = { entry: './index.js', plugins: [] } 复制代码 ...
本文目的,实现一个可以移除项目中 console.log 的 webpack 插件。 本来以为比较简单,但还是花了我一个上午的时间。 首先,我们需要初始化环境 yarn init -y yarn add webpack webpack-cli -D 复制代码 webpack.config.js 配置如下: module.exports = { entry: './index.js', plugins: [] } 复制代码 ...