Skip to content

Commit 971eb63

Browse files
committed
perf(preloader): start preloading slightly earlier
1 parent 8aec65f commit 971eb63

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/qwik/src/server/preload-impl.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,11 @@ export const includePreloader = (
160160
jsx('script', {
161161
type: 'module',
162162
'q:type': 'preload',
163+
/**
164+
* This async allows the preloader to be executed before the DOM is fully parsed even though
165+
* it's at the bottom of the body
166+
*/
167+
async: true,
163168
dangerouslySetInnerHTML: script,
164169
nonce,
165170
})

0 commit comments

Comments
 (0)