forked from longtao.wu/droboticflow
31 lines
761 B
JavaScript
31 lines
761 B
JavaScript
export function frontendManualChunk(id = "") {
|
|
if (!id.includes("node_modules")) {
|
|
return undefined;
|
|
}
|
|
|
|
if (id.includes("reactflow") || id.includes("dagre")) {
|
|
return "workflow-vendor";
|
|
}
|
|
|
|
// Recharts is only reachable from the lazily loaded ResourceUsageChart.
|
|
// Let Rollup keep it with that dynamic graph instead of promoting a
|
|
// charts-vendor dependency into the application entry chunk.
|
|
if (id.includes("recharts")) {
|
|
return undefined;
|
|
}
|
|
|
|
if (id.includes("/motion/")) {
|
|
return "motion-vendor";
|
|
}
|
|
|
|
if (id.includes("lucide-react")) {
|
|
return "icons-vendor";
|
|
}
|
|
|
|
if (id.includes("react-router-dom") || id.includes("/react-dom/") || id.includes("/react/")) {
|
|
return "react-vendor";
|
|
}
|
|
|
|
return undefined;
|
|
}
|