Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Svelte 5 next.179 breaks css on page navigation HMR #12381

Open
mrxbox98 opened this issue Jul 10, 2024 · 5 comments
Open

Svelte 5 next.179 breaks css on page navigation HMR #12381

mrxbox98 opened this issue Jul 10, 2024 · 5 comments
Milestone

Comments

@mrxbox98
Copy link

mrxbox98 commented Jul 10, 2024

Describe the bug

All css stops working on a page navigation in next.179. I upgraded from 175 (which was working) and this error appeared. Reverting to 175 worked properly. I use tailwindCSS. Nothing of importance was in the console.

The bug only occured in dev mode.

Reproduction

I couldn't figure out how to have page navigation svelte.dev.

Logs

No response

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (16) x64 AMD Ryzen 9 5900HX with Radeon Graphics        
    Memory: 11.03 GB / 31.42 GB
  Binaries:
    Node: 20.9.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 9.6.7 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.8.0 - ~\AppData\Local\pnpm\pnpm.EXE
    bun: 1.1.9 - ~\.bun\bin\bun.EXE
  Browsers:
    Edge: Chromium (126.0.2592.87)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    svelte: 5.0.0-next.179 => 5.0.0-next.179

Severity

blocking an upgrade

@shinokada
Copy link

shinokada commented Jul 10, 2024

Some of my Runes project are broken. 178 works but 179 breaks them.

Uncaught (in promise) TypeError: e.getAttribute is not a function

Another error:

Uncaught (in promise) Svelte error: svelte_component_invalid_this_value
The `this={...}` property of a `<svelte:component>` must be a Svelte component, if defined

@paoloricciuti
Copy link
Member

Can you provide a minimal reproduction?

@dummdidumm dummdidumm added this to the 5.0 milestone Jul 10, 2024
@pheuter
Copy link

pheuter commented Jul 10, 2024

I believe this might be related to an outstanding issue with HMR—temporarily disabling it in svelte.config.js fixed various weird issues for me:

const config = {
    compilerOptions: {
        hmr: false
    }
}

@mrxbox98
Copy link
Author

Did some further checking. My project works on next.178 but not 179. Currently working on making a reproduction repo.

@mrxbox98 mrxbox98 changed the title Svelte 5 next.179 breaks css on page navigation Svelte 5 next.179 breaks css on page navigation HMR Jul 10, 2024
@mrxbox98
Copy link
Author

Can you provide a minimal reproduction?

I tried creating a sveltekit app with the same tailwind config, but haven't been able to reproduce the issue yet. Currently attempting in https://github.com/mrxbox98/svelte-css-reproduction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants