[Bug?]: Required CSS is removed when components are re-exported
Duplicates
- [x] I have searched the existing issues
Latest version
- [x] I have tested the latest version
Current behavior 😯
Upon navigation some CSS that should be included in the page is removed from it.
Expected behavior 🤔
The CSS is not removed, and instead kept on the page.
Steps to reproduce 🕹
Steps:
- Go to this stackblitz example
- Navigate to About
- The link to About is not red
Context 🔦
I ran into an issue while building a relatively simple app today. I wanted to import my components more cleanly as
import { MyComponent, OtherComponent } from '~/components';
instead of
import { MyComponent } from '~/components/mycomponent';
import { OtherComponent } from '~/components/othercomponent';
So I created an index file to re-export them from, and imported all required custom components from there instead. However, I noticed that this always breaks the CSS of my navigation element, which is included in the root layout in app.tsx. I think this might be related to https://github.com/solidjs/solid-start/issues/1401.
It's possible to work around this by importing the components from their own files.
Let me know if the issue should be raised elsewhere instead. Thanks a lot for your excellent work on Solid!
Your environment 🌎
@katywings do you have ideas on this css issue? Probably a vinxi thing?
@brenelz (@iisakkirotko) Yeah, this sounds like either a regression or an edgecase that wasn't already fixed by nksaraf/vinxi@ce137037fe3aa3b8c953def11ed55dcf3e1f104 🙈. I recommend for now to import the components from their direct files. We are currently conceptualizing a future css solution together with Tanstack and with a bit of luck, we can skip fixing the open css bugs for the old solution 😅.
Alright, thanks for the update!