-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
Why is cssHash generated for my library? #15188
Comments
This reproduction is way too vague, please provide a cloneable GitHub repository or a REPL reproduction. |
Is it normal for the library to enter the compiler css hash function? |
I think this is expected. Component libraries are not compiled. They are simply transpiled out of their TypeScript (if used), and source code is packaged. When a project consumes them, they are compiled, and part of the process is to scope the CSS. However, this is just my thinking. It would be ideal to provide actual reproductions of the issue. |
You are right. But I cannot offer reproduction, it is actually something that can be looked at more locally. My main question is that it was not generating hashes before when I used the preprocessor I mentioned. Why is it generating now? |
without a reproduction repo (in this case i suggest 2 branches that showcase the different behavior in svelte4 and svelte5) it is impossible for us to tell. Us trying to reproduce it from your description would be time consuming and error prone. So if you believe this behavior to be a bug in svelte5, please provide one. If not and this is a more of a question, we can either convert this to a discussion or you ask about it on https://svelte.dev/chat in |
Describe the bug
Since I can't pass scoped css to child components in Svelte, I use preprocess to do this. When I migrated to Svelte 5, I thought there was a problem when I saw
svelte-{hash}
classnames in my snapshots. When I printed the cssHash function, it wrote the path of my library.Reproduction
Logs
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: