diff --git a/.changeset/rotten-days-help.md b/.changeset/rotten-days-help.md new file mode 100644 index 000000000..9d6986e17 --- /dev/null +++ b/.changeset/rotten-days-help.md @@ -0,0 +1,5 @@ +--- +'@vanilla-extract/vite-plugin': patch +--- + +Whitelist `vite-plugin-svelte` to enable emitting CSS on the server diff --git a/packages/vite-plugin/src/index.ts b/packages/vite-plugin/src/index.ts index 21195e75d..b87c24408 100644 --- a/packages/vite-plugin/src/index.ts +++ b/packages/vite-plugin/src/index.ts @@ -70,9 +70,12 @@ export function vanillaExtractPlugin({ if ( config.plugins.some((plugin) => - ['astro:build', 'solid-start-server', 'vite-plugin-qwik'].includes( - plugin.name, - ), + [ + 'astro:build', + 'solid-start-server', + 'vite-plugin-qwik', + 'vite-plugin-svelte', + ].includes(plugin.name), ) ) { forceEmitCssInSsrBuild = true;