Using Svelte and typescript, I would like to use paths for component import.
I have the following tsconfig.json
{
"extends": "@tsconfig/svelte/tsconfig.json",
"include": ["src/**/*"],
"main": "src/main.ts",
"exclude": ["node_modules/*", "__sapper__/*", "public/*"],
"compilerOptions": {
"baseUrl": "./",
"module": "es2020",
"target": "es2020",
"paths": {
"@src/*": ["src/*"],
"@environments/*": ["src/environments/*"]
}
}
}
Now when I do
<script lang="ts">
import Home from '@src/home/Home.svelte'
</script>
<style>
main {
width: 100%;
height: 100%;
position: relative;
}
</style>
<main>
<Home/>
</main>
The home point to some svelte internal file =>
instead of my Home.svelte
It works if I do import Home from './home/Home.svelte'
I can't figure out why.

