Avoid contenthash in development (#7423)

GitOrigin-RevId: 5a52a1af1f6add4dea135639f0ec5a4577dba124
This commit is contained in:
Alf Eaton 2022-04-06 18:33:39 +01:00 committed by Copybot
parent 9c036b1d90
commit 9e6b1fbb67

View file

@ -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 <style> tag)
new MiniCssExtractPlugin({