Render and extract a components CSS without turning on compilerOptions: {css: 'injected'}? #12976
-
Hi everyone! I'm currently upgrading my Svelte Component To Image package: https://github.com/StephenGunn/svelte-component-to-image to Svelte 5. I've run into an issue where the only way I can get it to work is by enabling 🔍 Question: Is there another way to access and render a component's CSS without needing to set Currently, I'm using the following code to render the component: const { head, body } = render(Component, { props }); This outputs the CSS into the Am I missing something or is this the only way to extract a single components css currently? Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Nevermind! I just learned about |
Beta Was this translation helpful? Give feedback.
Nevermind! I just learned about
<svelte:options>
- I was approaching it from the wrong direction.https://svelte.dev/docs/svelte/svelte-options