Context
Once this library can track module dependencies in Astro projects,
I can perform static analysis based on import relationships, similar to the existing support for Vue and Svelte.
Expected Behavior
dependency-cruiser can process .astro files and track dependencies
Current Behavior
dependency-cruiser does not support processing .astro files
Possible Solution
Using @astrojs/compiler/sync to process .astro files.
https://github.com/withastro/compiler/blob/main/packages/compiler/README.md
Using convertToTSX() method is better since transform exposes imports from Astro's internal modules.
Considered alternatives
Context
Once this library can track module dependencies in Astro projects,
I can perform static analysis based on import relationships, similar to the existing support for Vue and Svelte.
Expected Behavior
dependency-cruiser can process
.astrofiles and track dependenciesCurrent Behavior
dependency-cruiser does not support processing
.astrofilesPossible Solution
Using
@astrojs/compiler/syncto process.astrofiles.https://github.com/withastro/compiler/blob/main/packages/compiler/README.md
Using
convertToTSX()method is better sincetransformexposes imports from Astro's internal modules.Considered alternatives