From 62679927b90f9e3f639bdef4f05bec6c85022041 Mon Sep 17 00:00:00 2001 From: Dan Abramov <dan.abramov@gmail.com> Date: Tue, 26 Jul 2016 22:35:41 +0100 Subject: [PATCH] Use shorter hashes in production builds --- config/webpack.config.prod.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/config/webpack.config.prod.js b/config/webpack.config.prod.js index 335f46dd9..923554b6a 100644 --- a/config/webpack.config.prod.js +++ b/config/webpack.config.prod.js @@ -28,8 +28,8 @@ module.exports = { entry: path.join(paths.appSrc, 'index'), output: { path: paths.appBuild, - filename: '[name].[chunkhash].js', - chunkFilename: '[name].[chunkhash].chunk.js', + filename: '[name].[chunkhash:8].js', + chunkFilename: '[name].[chunkhash:8].chunk.js', publicPath: publicPath }, resolve: { @@ -71,6 +71,9 @@ module.exports = { test: /\.(jpg|png|gif|eot|svg|ttf|woff|woff2)$/, include: [paths.appSrc, paths.appNodeModules], loader: 'file', + query: { + name: '[name].[hash:8].[ext]' + } }, { test: /\.(mp4|webm)$/, @@ -122,6 +125,6 @@ module.exports = { screw_ie8: true } }), - new ExtractTextPlugin('[name].[contenthash].css') + new ExtractTextPlugin('[name].[contenthash:8].css') ] }; -- GitLab