webpack/test/statsCases/named-chunk-groups/webpack.config.js

44 lines
628 B
JavaScript

const stats = {
hash: false,
timings: false,
builtAt: false,
assets: false,
chunks: true,
chunkOrigins: true,
modules: false
};
const config = {
mode: "production",
entry: {
main: "./"
},
output: {
filename: "[name].js"
},
optimization: {
splitChunks: {
minSize: 100,
cacheGroups: {
vendors: {
test: /[\\/]node_modules[\\/]/,
chunks: "async",
enforce: true,
name: "vendors"
}
}
}
}
};
module.exports = [
{
stats: { entrypoints: false, chunkGroups: true, ...stats },
...config
},
{
stats: { entrypoints: true, chunkGroups: true, ...stats },
...config
}
];