UNPKG

easysetcookie

Version:

做一个方便查看和设置cookie的项目

33 lines (28 loc) 786 B
/** * webpack.prod.js * @authors hblvsjtu (hblvsjtu@163.com) * @date 2019-11-24 15:25:54 * @version 1.0.0 */ const webpack = require('webpack'); const merge = require('webpack-merge'); const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); const common = require('./webpack.common.js'); const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; const isShowBundleAnalyzer = false; // 是否加入打包的依赖分析 const plugins = [ new UglifyJSPlugin({ sourceMap: true, parallel: true }), new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('production') }) ]; if (isShowBundleAnalyzer) { plugins.push(new BundleAnalyzerPlugin()); } module.exports = merge(common, { mode: 'production', plugins });