Closed
Description
I'm working on an upgrade of my Svelte project to @sveltejs/kit@2
, vite-plugin-svelte@3
, vite@5
, and vitest@1
. All works fine, except I now get the following warning for each of my Svelte component:
10:52:18 [vite-plugin-svelte] .../StatusBar.svelte svelte.preprocess returned this file as a dependency of itself. This can be caused by an invalid configuration or importing generated code that depends on .svelte files (eg. tailwind base css)
Now, I'm using svelte-preprocess
and sass
in all of my components, like:
<!-- file: StatusBar.svelte -->
<script lang="ts">
// ...
</script>
<div>
...
</div>
<style src="./StatusBar.scss"></style>
When I remove <style src="./StatusBar.scss"></style>
from the file, the warning disappears so it looks like this is related to usage of SASS.
Any idea how to solve this?