output-compile-time-webpack-plugin
v1.0.5
Published
output-compile-time-webpack-plugin 是一款Webpack插件,用于输出Webpack编译项目所用的时间。
Maintainers
Readme
output-compile-time-webpack-plugin
1、安装
yarn add output-compile-time-webpack-plugin --dev2、使用
// webpack.config.js
const OutputCompileTimeWebpackPlugin = require('output-compile-time-webpack-plugin')
module.exports = {
// ... 省略其他配置
plugins: [
// ... 省略其他插件
new OutputCompileTimeWebpackPlugin()
]
}// vue.config.js
module.exports = {
// ... 省略其他配置
configureWebpack: config => {
// 用cdn方式引入
// ... 省略其他配置
const plugins = [
// ... 省略其他插件
new OutputCompileTimeWebpackPlugin()
]
config.plugins.push(...plugins)
}
}