From e80e96de0e476c6754f05ddb857247d7cd4bd76e Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sun, 28 Jul 2024 16:28:44 -0700 Subject: [PATCH] Don't hash files in development builds (cherry picked from commit bc7799139e52b92956eb595fb87f44d7dda9a320) --- frontend/build/webpack.config.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/build/webpack.config.js b/frontend/build/webpack.config.js index 77ead1d55..60dd6d2b1 100644 --- a/frontend/build/webpack.config.js +++ b/frontend/build/webpack.config.js @@ -66,7 +66,7 @@ module.exports = (env) => { output: { path: distFolder, publicPath: '/', - filename: '[name]-[contenthash].js', + filename: isProduction ? '[name]-[contenthash].js' : '[name].js', sourceMapFilename: '[file].map' }, @@ -91,7 +91,7 @@ module.exports = (env) => { new MiniCssExtractPlugin({ filename: 'Content/styles.css', - chunkFilename: 'Content/[id]-[chunkhash].css' + chunkFilename: isProduction ? 'Content/[id]-[chunkhash].css' : 'Content/[id].css' }), new HtmlWebpackPlugin({ @@ -201,7 +201,7 @@ module.exports = (env) => { options: { importLoaders: 1, modules: { - localIdentName: '[name]/[local]/[hash:base64:5]' + localIdentName: isProduction ? '[name]/[local]/[hash:base64:5]' : '[name]/[local]' } } },