Skip to content

Commit

Permalink
Do not put async loaded partials in chunks
Browse files Browse the repository at this point in the history
  • Loading branch information
jorg-vr committed Dec 5, 2023
1 parent d35e2f4 commit be1db88
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config/webpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ const config = {
commons: {
name: "commons",
chunks(chunk) {
// the chunk should be from a main entrypoint
// exclude "inputServiceWorker" from commons chunk
return chunk.name !== "inputServiceWorker";
return chunk.name !== "inputServiceWorker" && Object.keys(sourceFiles).includes(chunk.name);
},
minChunks: 2,
},
Expand Down

0 comments on commit be1db88

Please sign in to comment.