fix(qwik): SPA Link nav
This commit is contained in:
12
.vscode/launch.json
vendored
12
.vscode/launch.json
vendored
@@ -40,6 +40,18 @@
|
||||
"program": "${workspaceFolder}/packages/docs/node_modules/vite/bin/vite.js",
|
||||
"args": ["build", "-c", "adapters/cloudflare-pages/vite.config.mts"]
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"name": "preloader-test build.client",
|
||||
"request": "launch",
|
||||
"runtimeExecutable": "pnpm",
|
||||
"runtimeArgs": [
|
||||
"run",
|
||||
"build.client"
|
||||
],
|
||||
"skipFiles": ["<node_internals>/**"],
|
||||
"cwd": "${workspaceFolder}/starters/apps/preloader-test"
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"name": "e2e.test",
|
||||
|
||||
@@ -26,9 +26,10 @@ export function getRouteImports(routes: BuildRoute[], manifest: QwikManifest) {
|
||||
for (const bundleName of Object.keys(manifest.bundles)) {
|
||||
const bundle = manifest.bundles[bundleName];
|
||||
if (bundle.origins?.some((s) => s.endsWith(QWIK_CITY_PLAN_ID))) {
|
||||
// Don't consider the city plan for preloading
|
||||
// we keep imports because something might be bundled with it
|
||||
result[bundleName] = { imports: bundle.imports, dynamicImports: [] };
|
||||
result[bundleName] = {
|
||||
...bundle,
|
||||
dynamicImports: bundle.dynamicImports?.filter((d) => d.includes('menu')),
|
||||
};
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,8 +64,12 @@ describe('modifyBundleGraph', () => {
|
||||
],
|
||||
},
|
||||
"q-city-plan.js": {
|
||||
"dynamicImports": [],
|
||||
"imports": undefined,
|
||||
"dynamicImports": undefined,
|
||||
"origins": [
|
||||
"@qwik-city-plan",
|
||||
],
|
||||
"size": 0,
|
||||
"total": 0,
|
||||
},
|
||||
}
|
||||
`);
|
||||
|
||||
Reference in New Issue
Block a user