tauri-apps / tauri

Build smaller, faster, and more secure desktop applications with a web frontend.
https://tauri.app
Apache License 2.0
79.63k stars 2.37k forks source link

[bug] CSS randomly applied using Sveltekit + Tauri (v1 and v2) #10173

Open CraneCristal opened 5 days ago

CraneCristal commented 5 days ago

Describe the bug

When launching tauri in dev mode, some CSS is not applied, and it changes from one launch to another. It seems like the scoped CSS is randomly applied or not.

I cannot reproduce the same issue in browser and the only workaround I find for now is to reload all with ViteJs. The issue does not happen in build.

Reproduction

No response

Expected behavior

No response

Full tauri info output

/usr/bin/npm run tauri dev

> fusion-launcher@0.1.0 tauri
> tauri dev

    Running BeforeDevCommand (`npm run dev`)

> fusion-launcher@0.1.0 dev
> vite dev

Using existing cloned repo
ℹ [paraglide] Compiling Messages into ./src/lib/paraglide                                                                                                                                                                                          

  VITE v5.3.1  ready in 1070 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
    Info Watching /home/nathan/Documents/Projects/fusion-launcher/src-tauri for changes...
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.13s
alternate canonicalPath:  / currentLang:  en localized:  /

Stack trace

No response

Additional context

Tested with webkit2gtk-4.1 on Linux

FabianLars commented 4 days ago

I cannot reproduce the same issue in browser and the only workaround I find for now is to reload all with ViteJs.

Can you test it in epiphany (also known as Gnome Web) too? It's a browser using webkitgtk like tauri. This way we can check whether it's an upstream issue or our fault.