Skip to content

Commit

Permalink
add ALL dynamic imports to bundle graph
Browse files Browse the repository at this point in the history
  • Loading branch information
shairez committed Dec 15, 2024
1 parent d70d709 commit af01769
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions packages/qwik/src/optimizer/src/plugins/vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1171,18 +1171,16 @@ export function convertManifestToBundleGraph(manifest: QwikManifest): QwikBundle
let didAdd = false;
for (const depName of bundle.dynamicImports || []) {
// If we dynamically import a qrl segment that is not a handler, we'll probably need it soon
const dep = graph[depName];
// const dep = graph[depName];
if (!graph[depName]) {
// external dependency
continue;
}
if (dep.isTask) {
if (!didAdd) {
deps.add('<dynamic>');
didAdd = true;
}
deps.add(depName);
if (!didAdd) {
deps.add('<dynamic>');
didAdd = true;
}
deps.add(depName);
}
map.set(bundleName, { index, deps });
bundleGraph.push(bundleName);
Expand Down

0 comments on commit af01769

Please sign in to comment.