Skip to content

Commit 6267992

Browse files
committed
Use shorter hashes in production builds
1 parent 8050588 commit 6267992

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

config/webpack.config.prod.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ module.exports = {
2828
entry: path.join(paths.appSrc, 'index'),
2929
output: {
3030
path: paths.appBuild,
31-
filename: '[name].[chunkhash].js',
32-
chunkFilename: '[name].[chunkhash].chunk.js',
31+
filename: '[name].[chunkhash:8].js',
32+
chunkFilename: '[name].[chunkhash:8].chunk.js',
3333
publicPath: publicPath
3434
},
3535
resolve: {
@@ -71,6 +71,9 @@ module.exports = {
7171
test: /\.(jpg|png|gif|eot|svg|ttf|woff|woff2)$/,
7272
include: [paths.appSrc, paths.appNodeModules],
7373
loader: 'file',
74+
query: {
75+
name: '[name].[hash:8].[ext]'
76+
}
7477
},
7578
{
7679
test: /\.(mp4|webm)$/,
@@ -122,6 +125,6 @@ module.exports = {
122125
screw_ie8: true
123126
}
124127
}),
125-
new ExtractTextPlugin('[name].[contenthash].css')
128+
new ExtractTextPlugin('[name].[contenthash:8].css')
126129
]
127130
};

0 commit comments

Comments
 (0)