plugins:[//newCleanWebpackPlugin(['static']),newCleanWebpackPlugin(pathsToClean,cleanOptions),newwebpack.optimize.CommonsChunkPlugin({//names:['jquery','vendor','runtime'],//names:['jquery','echarts','highcharts','vendor'],//跟页面插入的顺序相反//names:['echarts','highcharts','vendor'],//names:['highcharts','vendor'],names:['vendor'],minChunks:Infinity}),newHtmlWebpackPlugin({title:'OutputManagement',//excludeAssets:[/style.*.js/]//excludestyle.jsorstyle.[chunkhash].js}),newHtmlWebpackExcludeAssetsPlugin(),newwebpack.DefinePlugin({'process.env':{'NODE_ENV':JSON.stringify('production')}})/*newwebpack.ProvidePlugin({//将$变量挂载到window下面,可以在项目中直接使用$不用再引用$:"jquery",jQuery:"jquery","window.jQuery":"jquery"})*/]
相关分类