webpack/test/watchCases/chunks/esm-async-chunks-hmr/webpack.config.js

32 lines
665 B
JavaScript
Raw Normal View History

/** @type {import("../../../../").Configuration} */
module.exports = {
experiments: {
outputModule: true
},
optimization: {
splitChunks: {
chunks: "all",
minSize: 1,
cacheGroups: {
react: {
test: /react/,
name: "react",
chunks: "all",
priority: 100
}
}
},
runtimeChunk: {
/**
* @param {import("../../../../").Entrypoint} entrypoint The entrypoint to generate runtime chunk name for
* @returns {string} The generated runtime chunk name
*/
name: entrypoint => `runtime-${entrypoint.name}`
}
},
output: {
2025-06-20 22:08:04 +08:00
filename: "[name].[contenthash].mjs",
chunkFilename: "[name].[contenthash].mjs"
}
};