Skip to content

Commit

Permalink
site: preload fonts (#9132)
Browse files Browse the repository at this point in the history
Co-authored-by: Puru Vijay <devpuruvj@gmail.com>
  • Loading branch information
benmccann and PuruVJ committed Aug 22, 2023
1 parent f2ead82 commit 2f5d573
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sites/svelte.dev/src/hooks.server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** @type {import('@sveltejs/kit').Handle} */
export async function handle({ event, resolve }) {
return await resolve(event, {
preload: ({ type }) => type === 'js' || type === 'css' || type === 'font'
});
}

0 comments on commit 2f5d573

Please sign in to comment.