Open pheuter opened 1 year ago
Seems to works fine if you import uno.css
in the client hooks src/hooks.client.ts
. Doesn't help on why it's Safari specific.
@Smirow While moving the imports from +layout.svelte
into hooks.client.ts
fixes the client-side error, it appears to add FOUC upon server-side loads, suggesting it may not be the proper place to add those imports?
@pheuter yes, also noticed the FOUC, same thing happens with Tailwind if you import it in hooks.client.ts
. Which raises questions about the lifecycles of hooks.client.ts
and +layout.svelte
.
This looks to me like a Uno bug, not a SvelteKit bug. Have you raised an issue over there?
@Rich-Harris https://github.com/unocss/unocss/issues/2111#issuecomment-1407424016 š¤·
I am also having this problem. Moving the import in not a solution for reasons above, but it does make the exception go away. However, I'd like to offer some more info.
With my import in my normal spot, not moved to hooks.client.js, I get many errors when doing a npm dev run
. The errors start right after the message [vite-plugin-svelte] ssr compile in progress ...
. I started by creating a discussion on TailwindCSS because the errors all appeared to be related to Tailwind. When I remove UnoCSS from the error go away. Rather than repeat, here is that thread: https://github.com/tailwindlabs/tailwindcss/discussions/10496
Our solution to this issue: link
Want to note that this error appears only in npm run dev
without any special settings.
Everything is fine in build/preview
(unless there is no vite.build.target = 'esnext'
of course).
So it's not critical
Describe the bug
Was instructed to create a new issue with repro from convo in #2889.
Reproduction
https://github.com/pheuter/safari-repro
Logs
System Info
Severity
blocking all usage of SvelteKit
Additional Information
Blocks all client-side usage of SvelteKit on latest versions of Safari.