const webpack = require('webpack') const { merge } = require('webpack-merge') const MiniCssExtractPlugin = require('mini-css-extract-plugin') const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin') process.env.REACT_REFRESH = '1' const base = require('./webpack.config') module.exports = merge(base, { mode: 'development', // 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