Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Keep async vendor chunks out of the main app's initial bundle (#78304)

Romeo Van Snick001485bb4bd3
diff --git a/rspack.main.config.js b/rspack.main.config.js
index fc9328b1df8..dd254afb2ab 100644
--- a/rspack.main.config.js
+++ b/rspack.main.config.js
@@ -257,7 +257,9 @@ const config = {
// sharing the vendor chunk would re-link them. Keep its
// node_modules in its own chunks.
chunks: (chunk) =>
- chunk.name !== "data-app-vendors" && chunk.name !== "app-data-app",
+ chunk.canBeInitial() &&
+ chunk.name !== "data-app-vendors" &&
+ chunk.name !== "app-data-app",
name: "vendor",
priority: -10,
},