The paths
configuration in your tsconfig.json
is supposed to be placed inside the compilerOptions
. Like this:
{
"extends": "astro/tsconfigs/strict",
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"],
"compilerOptions": {
"verbatimModuleSyntax": true,
"baseUrl": ".",
"paths": {
"@components/*": ["./src/components/*"],
"@layouts/*": ["./src/layouts/*"],
"@assets/*": ["./src/assets/*"],
"@styles/*": ["./src/styles/*"]
}
}
}
Read more here; https://www.typescriptlang.org/tsconfig/#paths