Can we disable css preload of dynamic components #10044
Unanswered
PlopTheReal
asked this question in
Q&A
Replies: 1 comment
-
See the part about the // src/hooks.server.ts
import type { Handle } from '@sveltejs/kit';
export const handle = (async ({ event, resolve }) => {
const response = await resolve(event, {
preload: ({ type }) => type === 'js'
});
return response;
}) satisfies Handle; |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Let's say I have hundreds of dynamic components that are loaded dynamically with #await.
Is it possible to load the css of thoses when loading the component instead of loading all the css files on the initial page load?
Or inject the styles in the js chunk?
Beta Was this translation helpful? Give feedback.
All reactions