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
14 changes: 13 additions & 1 deletion frontend/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,22 @@ module.exports = (env, argv) => {
],
splitChunks: {
cacheGroups: {
// qrcode is only used during MFA enrollment (dynamic import).
// Give it its own async chunk so it never lands in vendors.js.
qrcode: {
test: /[\\/]node_modules[\\/]qrcode[\\/]/,
name: 'qrcode',
chunks: 'async',
priority: 20,
enforce: true
},
vendor: {
test: /[\\/]node_modules[\\/]/,
name: 'vendors',
chunks: 'all'
// 'initial' means only synchronously-imported packages go here;
// async-only deps (e.g. qrcode) stay in their own lazy chunks.
chunks: 'initial',
priority: 10
}
}
}
Expand Down
Loading