Astro Info
Astro v6.0.5
Node v25.7.0
System Windows (x64)
Package Manager unknown
Output static
Adapter none
Integrations none
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
tsconfig.json
{
"compilerOptions": {
"paths": {
"@/*": ["./src/*"]
}
}
}
When a component is imported with @
import Test from '@/components/test.astro';
[astro:build] Could not load ./src/components/test.astro?astro&type=style&index=0&lang.css (imported by src/components/test.astro):
No cached compile metadata found for "./src/components/test.astro?astro&type=style&index=0&lang.css".
The main Astro module "./src/components/test.astro" should have compiled and filled the metadata first, before its virtual modules can be requested.
Stack trace:
at Object.handler (file:///./node_modules/astro/dist/vite-plugin-astro/index.js:115:19)
at file:///./node_modules/astro/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:22571:40
at async file:///./node_modules/astro/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:21445:33
There is no error when the component is imported using a relative path.
import Test from '../components/test.astro';
stylebug.zip
What's the expected result?
No error
Link to Minimal Reproducible Example
file
Participation
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
tsconfig.json
{ "compilerOptions": { "paths": { "@/*": ["./src/*"] } } }When a component is imported with @
There is no error when the component is imported using a relative path.
stylebug.zip
What's the expected result?
No error
Link to Minimal Reproducible Example
file
Participation