-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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: intro transition doesn't work in dev mode #12358
Comments
I believe transition is turned off by this line. |
If you make the transition global, it should work as intended. |
Oh, thanks. That fixed it. But is it by design that dev and prod mode behave differently? |
@hgl I get the exact same behaviour in prod as I do in dev. |
In my case if i remove the global modifier, and build the project, intro transition works (kinda, doesn't trigger on first load, but triggers on subsequent dynamic loads). Screen.Recording.2024-07-10.at.8.54.10.PM.mov |
What does a "dynamic load" mean? |
first load: page loads and the component is loaded. Without the global modifier:
|
Ah, you mean the |
Describe the bug
When in dev mode, intro transition doesn't trigger. But once the project is built, it correctly triggers.
Reproduction
Clone https://github.com/hgl/svelte-intro-transition
Run
pnpm dev
.Click the toggle button.
The red box should fade in, but it currently doesn't.
I didn't add
intro: true
since it's now the default.Logs
No response
System Info
System: OS: macOS 14.5 CPU: (12) arm64 Apple M2 Pro Memory: 53.69 MB / 32.00 GB Shell: 3.7.1 - /run/current-system/sw/bin/fish Binaries: Node: 18.19.1 - /etc/profiles/per-user/hgl/bin/node npm: 10.2.4 - /etc/profiles/per-user/hgl/bin/npm pnpm: 8.15.5 - /etc/profiles/per-user/hgl/bin/pnpm Browsers: Chrome: 126.0.6478.127 Safari: 17.5 Safari Technology Preview: 18.0 npmPackages: svelte: 5.0.0-next.178 => 5.0.0-next.178
Severity
annoyance
The text was updated successfully, but these errors were encountered: