-
-
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
fix: mark custom element with virtual class attribute as dynamic #13435
Conversation
🦋 Changeset detectedLatest commit: d4e6e64 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
I briefly tried moving the "add the scoping classes" logic into the That said, each element has a Either way, the whole CSS part is very complicated and intertwined with the rest of the things, so I think there's no solution without drawbacks. |
Yeah to be fair I think this is a niche enough case tat is fine to have a one off check after adding the class. WDYT? |
Are you relating to the current logic? Yes, there's no other good (and more important immediate) way I see here. So it comes down to either adding the path to the metadata, or to use |
Oh that's interesting as well but how much refactor would require at every usage site? I'll take a look later and eventually change the implementation |
Is the |
@dummdidumm i'm trying to change the mehavior of |
@dummdidumm i think this is ready? |
Svelte 5 rewrite
Closes #13426
Initially i just marked every custom element as dynamic but that would've been a lot more code generated if there was a custom element that was actually skipped (this was problematic only because that custom element ends up having an attribute (the virtual class file). Since i needed the
path
to mark the tree as dynamic i've added it to the metadata because i didn't find a way to get the path from the element itself but if there's a better approach i can change it obviously.Please note that the Svelte codebase is currently being rewritten for Svelte 5. Changes should target Svelte 5, which lives on the default branch (
main
).If your PR concerns Svelte 4 (including updates to svelte.dev.docs), please ensure the base branch is
svelte-4
and notmain
.Before submitting the PR, please make sure you do the following
feat:
,fix:
,chore:
, ordocs:
.Tests and linting
pnpm test
and lint the project withpnpm lint