使用webpack打包生成的filename: '[name].[chunkhash].js'怎么放到html文件中

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"
})
*/
]
猛跑小猪
浏览 928回答 2
2回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript