2025-05-30 20:30:09 +08:00
|
|
|
/** @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"
|
2025-05-30 20:30:09 +08:00
|
|
|
}
|
|
|
|
};
|