withastro / language-tools

Language tools for Astro
MIT License
267 stars 52 forks source link

🐛 BUG: auto import is not work with `index.ts` #927

Closed cxa closed 2 months ago

cxa commented 2 months ago

Describe the Bug

For a project structured like this:

── src │   ├── components │   │   ├── AAA.astro │   │   └── BBB │   │   ├── index.astro │   │   └── index.ts │   └── pages │   └── index.astro

index.ts is simple that reexport with name:

import {default as BBB} from './index.astro';

in pages/index.astro, we can get AAA auto imported(which is from AAA.astro):

Screenshot 2024-08-03 at 19 30 55

but failed to auto import with BBB:

Screenshot 2024-08-03 at 19 31 17

Steps to Reproduce

Can reproduce with this demo projec:

demo.zip

Link to Minimal Reproducible Example

https://github.com/user-attachments/files/16479361/demo.zip

cxa commented 2 months ago

Never mind. Issue on my side.