From 9e6b1fbb672380d1a1cf544839c66d51f67ccb54 Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Wed, 6 Apr 2022 18:33:39 +0100 Subject: [PATCH] Avoid contenthash in development (#7423) GitOrigin-RevId: 5a52a1af1f6add4dea135639f0ec5a4577dba124 --- services/web/webpack.config.dev.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/services/web/webpack.config.dev.js b/services/web/webpack.config.dev.js index 77bb4baaf6..d4ae1c0aeb 100644 --- a/services/web/webpack.config.dev.js +++ b/services/web/webpack.config.dev.js @@ -10,6 +10,31 @@ module.exports = merge(base, { // Enable accurate source maps for dev devtool: 'source-map', + // Load entrypoints without contenthash in filename + output: { + filename: 'js/[name].js', + }, + + // Load assets without contenthash in filename + module: { + rules: [ + { + test: /\.(woff|woff2)$/, + type: 'asset/resource', + generator: { + filename: 'fonts/[name][ext]', + }, + }, + { + test: /\.(svg|gif|png|jpg|pdf)$/, + type: 'asset/resource', + generator: { + filename: 'images/[name][ext]', + }, + }, + ], + }, + plugins: [ // Extract CSS to a separate file (rather than inlining to a