Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions config/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,10 @@ module.exports = (webpackEnv, argv) => {
// Add /* filename */ comments to generated require()s in the output.
// TODO: rspack: pathinfo: isEnvDevelopment,
// There will be one main bundle, and one file per asynchronous chunk.
filename: '[name].[contenthash:8].js',
// Fix HMR error in development: https://github.com/webpack/webpack-dev-server/issues/3168#issuecomment-816709164
filename: isEnvDevelopment ? '[name].js' : '[name].[contenthash:8].js',
// There are also additional JS chunk files if you use code splitting.
chunkFilename: '[name].[contenthash:8].chunk.js',
chunkFilename: isEnvDevelopment ? '[name].chunk.js' : '[name].[contenthash:8].chunk.js',
assetModuleFilename: 'assets/[name].[hash][ext]',
// webpack uses `publicPath` to determine where the app is being served from.
// It requires a trailing slash, or the file assets will get an incorrect path.
Expand Down
Loading