Skip to content

Commit 538ec66

Browse files
committed
chore: fix allowedPreloads
1 parent ff61f13 commit 538ec66

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/docs/vite.config.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export default defineConfig(async () => {
173173
],
174174
},
175175
}),
176-
qwikVite({ debug: false }),
176+
qwikVite({ debug: true }),
177177
partytownVite({
178178
dest: resolve('dist', '~partytown'),
179179
}),

packages/qwik/src/core/preloader/queue.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,10 @@ export const trigger = () => {
8282
console.log('limit :', limit);
8383
const allowedPreloads = graph
8484
? // The more likely the bundle, the more simultaneous preloads we want to allow
85-
Math.max(1, Number(limit) || config[maxSimultaneousPreloadsStr] * probability)
85+
Math.max(1, (Number(limit) || config[maxSimultaneousPreloadsStr]) * probability)
8686
: // While the graph is not available, we limit to 2 preloads
8787
2;
88+
console.log('allowedPreloads :', allowedPreloads);
8889
if (preloadCount < allowedPreloads) {
8990
queue.shift();
9091
preloadOne(bundle);

0 commit comments

Comments
 (0)