Unexpected Components Behavior in SvelteKit with Turborepo #13515
-
Hi! I'm working on a SvelteKit project set up with Turborepo. My components are located in Components in the import MyComponent from "@myrepo/ui/components/MyComponent.svelte"; The import works fine, but the same component behaves differently depending on whether it's placed in Issues I've discovered:
However, if I import the component (same code) directly from import MyComponent from "$lib/components/MyComponent.svelte"; these issues do not occur, and everything works fine. Has anyone encountered similar issues? Thank you very much! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
So I found a problem that I couldn't easily simulate before. The problem is related to TypeScript, My solution was to get rid of the dependency https://www.npmjs.com/package/svelte-preprocess (which I was using for historical reasons) and use the classic vite preprocess. There is also an old issue on github: sveltejs/svelte-preprocess#662 |
Beta Was this translation helpful? Give feedback.
So I found a problem that I couldn't easily simulate before.
The problem is related to TypeScript,
<script lang="ts">
and...rest
parameter when using svelte-preprocess.My solution was to get rid of the dependency https://www.npmjs.com/package/svelte-preprocess (which I was using for historical reasons) and use the classic vite preprocess.
There is also an old issue on github: sveltejs/svelte-preprocess#662