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

solid-router view transitions don't work with autoCodeSplitting #3736

Open
Royserg opened this issue Mar 11, 2025 · 0 comments
Open

solid-router view transitions don't work with autoCodeSplitting #3736

Royserg opened this issue Mar 11, 2025 · 0 comments

Comments

@Royserg
Copy link

Royserg commented Mar 11, 2025

Which project does this relate to?

Router

Describe the bug

After following the Quick Start for Solid-Router docs

and adding this line to vite.config.js file (autoCodeSplitting)

    TanStackRouterVite({ target: 'solid', autoCodeSplitting: true }),

default View Transitions stop working.
Exactly the same setup but with React works fine.

working React example: https://stackblitz.com/edit/tanstack-router-a9utvecb?file=src%2Froutes%2Findex.tsx,src%2Froutes%2Fabout.tsx,src%2Fmain.tsx,vite.config.js&preset=node

video of working React example (element animates into the next page):

react-router-transitions.mov

same setup, Solid JS (no animation, only default fade out/in):

solid-issue.mov

Current workaround to get view transitions working is to comment out/remove autoCodeSplitting: true

Your Example Website or App

https://stackblitz.com/edit/tanstack-router-hwsymfma?file=vite.config.js

Steps to Reproduce the Bug or Issue

  1. Setup project using Quick Start guide for solidjs
  2. set defaultViewTransition: true on the Router
  3. mark elements on 2 separate pages with the same view-transition-name
  4. navigate from one page to the other.

Expected behavior

I expect elements that share the same view-transition-name to animate on page change

react-router-transitions.mov

Screenshots or Videos

No response

Platform

  • OS: macOS m3
  • Browser: Chrome
  • Version 133.0.6943.142 (Official Build) (arm64)

Additional context

I asked on DS. Manuel found a workaround and asked to create an issue
Thread ID: 1348781115850096741

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

No branches or pull requests

2 participants