Skip to content

Commit 9f04950

Browse files
committed
removed the inclusion of city-plan dynamic imports
1 parent df5c3bf commit 9f04950

File tree

2 files changed

+21
-12
lines changed

2 files changed

+21
-12
lines changed

packages/docs/src/routes/api/qwik/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3653,7 +3653,7 @@ Options for the prefetch service worker.
36533653
</tbody></table>
36543654
**Returns:**
36553655
3656-
JSXNode&lt;'script'&gt;
3656+
[JSXNode](#jsxnode)&lt;'script'&gt;
36573657
36583658
[Edit this section](https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/buffering/components/prefetch.ts)
36593659

packages/qwik/src/optimizer/src/plugins/bundle-graph.ts

+20-11
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,28 @@ export function convertManifestToBundleGraph(
3434
}
3535
clearTransitiveDeps(deps, new Set(), depName, manifestGraph);
3636
}
37-
let didAddSeparator = false;
38-
for (const depName of bundle.dynamicImports || []) {
39-
// If we dynamically import a qrl segment that is not a handler, we'll probably need it soon
37+
if (bundle.origins) {
38+
const qwikCityPlanOrigin = bundle.origins.find((origin) =>
39+
origin.includes('@qwik-city-plan')
40+
);
41+
if (qwikCityPlanOrigin) {
42+
console.log('******* bundle', bundleName, 'origin', qwikCityPlanOrigin);
43+
} else {
44+
let didAddSeparator = false;
45+
for (const depName of bundle.dynamicImports || []) {
46+
// If we dynamically import a qrl segment that is not a handler, we'll probably need it soon
4047

41-
if (!manifestGraph[depName]) {
42-
// external dependency
43-
continue;
44-
}
45-
if (!didAddSeparator) {
46-
deps.add('<dynamic>');
47-
didAddSeparator = true;
48+
if (!manifestGraph[depName]) {
49+
// external dependency
50+
continue;
51+
}
52+
if (!didAddSeparator) {
53+
deps.add('<dynamic>');
54+
didAddSeparator = true;
55+
}
56+
deps.add(depName);
57+
}
4858
}
49-
deps.add(depName);
5059
}
5160
map.set(bundleName, { index, deps });
5261
bundleGraph.push(bundleName);

0 commit comments

Comments
 (0)