Problem
CodeGraph currently only indexes .ts, .js, .mjs, and .yml files. It does not index .astro or .css files, which makes it nearly unusable for Astro projects.
Reproduction
Take the stalux project as an example — a typical Astro blog theme:
| File Type |
Actual Files |
Indexed by CodeGraph |
.astro |
55 |
0 ❌ |
.css |
35 |
0 ❌ |
.ts |
14 |
14 ✅ |
.js / .mjs |
2 |
2 ✅ |
.yml |
2 |
2 ✅ |
~80% of the project's source code is invisible to CodeGraph.
Concrete examples
Functions in .astro frontmatter are not found:
# This function is defined in src/components/stalux/layout/navs.astro (frontmatter)
codegraph search getIconNode # ❌ No results found
# But .ts functions work fine:
codegraph search toTimestamp # ✅ Returns 4 results correctly
CSS module class usage cannot be analyzed:
# No way to check which CSS classes are dead code
# postRight.module.css had 200+ lines of unused classes
# that could not be detected through codegraph
Why this matters
Astro is a rapidly growing framework (40k+ GitHub stars). Many projects using CodeGraph are built with Astro. Without .astro indexing:
codegraph_explore cannot answer questions about component architecture
codegraph_callers/codegraph_callees cannot trace cross-component dependencies
codegraph_impact cannot assess refactoring risk
- Dead CSS detection is impossible
Proposed solution
- Parse
.astro files and index:
- The frontmatter TypeScript/JavaScript block (
--- sections) — functions, imports, variables
- Component-level symbols for cross-file reference tracking
- Parse
.css/.module.css files and index class selectors for dead-code analysis
Thank you for the great tool!
Problem
CodeGraph currently only indexes
.ts,.js,.mjs, and.ymlfiles. It does not index.astroor.cssfiles, which makes it nearly unusable for Astro projects.Reproduction
Take the stalux project as an example — a typical Astro blog theme:
.astro.css.ts.js/.mjs.yml~80% of the project's source code is invisible to CodeGraph.
Concrete examples
Functions in
.astrofrontmatter are not found:CSS module class usage cannot be analyzed:
Why this matters
Astro is a rapidly growing framework (40k+ GitHub stars). Many projects using CodeGraph are built with Astro. Without
.astroindexing:codegraph_explorecannot answer questions about component architecturecodegraph_callers/codegraph_calleescannot trace cross-component dependenciescodegraph_impactcannot assess refactoring riskProposed solution
.astrofiles and index:---sections) — functions, imports, variables.css/.module.cssfiles and index class selectors for dead-code analysisThank you for the great tool!