mirror of
https://github.com/youzan/vant.git
synced 2025-10-15 23:55:08 +00:00
use bundle analyzer plugin to analyze budle size
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
const webpack = require('webpack');
|
||||
const config = require('./webpack.config.dev.js');
|
||||
const isMinify = process.argv.indexOf('-p') !== -1;
|
||||
const isMinify = process.argv.indexOf('-p') !== -1;
|
||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
||||
|
||||
config.entry = {
|
||||
'vant': './packages/index.js'
|
||||
@@ -39,6 +40,11 @@ config.plugins = [
|
||||
new webpack.optimize.ModuleConcatenationPlugin()
|
||||
];
|
||||
|
||||
// analyze bundle size if need
|
||||
// if (isMinify) {
|
||||
// config.plugins.push(new BundleAnalyzerPlugin());
|
||||
// }
|
||||
|
||||
delete config.devtool;
|
||||
|
||||
module.exports = config;
|
||||
|
Reference in New Issue
Block a user