Closed
Description
Describe the bug
With the following content in hooks.server.ts
export async function handle({ event, resolve }: any) {
const response = await resolve(event, {
preload: ({ type }: any) => type === "font"
});
return response;
}
after an npm run build
and npm run preview
, running the page shows needed stylesheets are not loaded into , causing FOUC.
Adding a preload for css fixes it (or just not including any preload at all)
Reproduction
See code above - hopefully that's sufficient
Logs
No response
System Info
System:
OS: macOS 13.0.1
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Memory: 1.09 GB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.14.2 - /usr/local/Cellar/nvm/0.38.0/versions/node/v16.14.2/bin/node
Yarn: 1.22.17 - /usr/local/Cellar/nvm/0.38.0/versions/node/v16.11.1/bin/yarn
npm: 9.2.0 - ~/Documents/git/booklist/svelte-kit/node_modules/.bin/npm
Browsers:
Chrome: 108.0.5359.124
Firefox: 108.0.1
npmPackages:
@sveltejs/adapter-auto: next => 1.0.0-next.89
@sveltejs/kit: ^1.0.1 => 1.0.1
svelte: ^3.44.0 => 3.54.0
vite: ^4.0.1 => 4.0.1
Severity
serious, but I can work around it
Additional Information
No response