-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
feat: allow for svelte:options
css injected
#12660
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
Conversation
🦋 Changeset detectedLatest commit: a55a341 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 |
packages/svelte/tests/server-side-rendering/samples/css-injected-options-nested/Nested.svelte
Outdated
Show resolved
Hide resolved
see #12656 (comment) if file content is allowed to change the compilerOptions, callers of compile need to be made aware so they can act accordingly. esp css where vite-plugin-svelte adds a virtual css module in case it is external. |
Recapping Discord discussion: we should probably only allow
This should be fine — when |
So should i just remove the |
with the limitation that only I still think there needs to be a way to know the effectively used compiler options per file and i also still think that the control belongs to the project calling compile, not the component author. But ultimately you can use a preprocessor to remove that option so while this adds inconvenience, its not impossible. It should be documented though that adding so maybe instead of using css="injected" and having to add code that yells at you for "external", make it something like |
I can agree to the force-css-injected thing...so, except for that are we good to go with this or there's something else we need? |
It should be |
But it make sense to have css="injected" if it's the only value that you can set? Is it to future proof it? |
It's confusing if it doesn't match the underlying |
thanks! |
Svelte 5 rewrite
Closes #12656
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