feat: hash the webpack-compiled js file

This commit is contained in:
endiliey 2018-08-11 16:29:52 +08:00
parent d33343b7c6
commit ea706d2830
2 changed files with 32 additions and 1 deletions

View file

@ -20,7 +20,7 @@ module.exports = function createBaseConfig(props) {
config
.mode(isProd ? 'production' : 'development')
.output.path(outDir)
.filename(isProd ? 'bundle.js' : '[name].js')
.filename(isProd ? '[name].[chunkhash].js' : '[name].js')
.publicPath(isProd ? baseUrl : '/');
if (!isProd) {