[Feature] Read Astro srcDir

Open
#6,451 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@Hung1510 is already working on this.

Since Nov 27, 2026.

  • #6470 by @Hung1510 — open

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
70/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Domain
backend, tooling

Research direction

Start with packages/core/src/repowise/core/ingestion/framework_facts/astro.py and compare its static facts with Nuxt’s nuxt_src_dir config reader. Then inspect tests/unit/ingestion/test_astro_resolver.py and docs/architecture/language-support.md:750. Done means literal srcDir and publicDir are handled with the default src, entry globs and root-relative URL lookup use the configured directories, and tests cover custom and default srcDir.

Written by the indexing model from the issue text.

Description

enhancement help wanted

Summary

Astro's srcDir option is not read. The entry globs are fixed to src/pages/* and the other src/... conventions, so an app with srcDir: './app' has its pages, middleware and content config unanchored.

packages/core/src/repowise/core/ingestion/framework_facts/astro.py:12

entry_globs=(
    "src/pages/*",

docs/architecture/language-support.md:750 lists srcDir as not read.

Mechanism

ASTRO is a static FrameworkFacts with no config reader. Nuxt has one (nuxt_src_dir) that reads a literal srcDir from the config text, and Astro has the same option with no equivalent.

Repro

// astro.config.mjs
export default defineConfig({ srcDir: './app' })

app/pages/index.astro and app/middleware.ts are reported as unreachable.

Impact

False dead-code findings and unresolved root-relative asset URLs for Astro apps that move their source directory.

Done looks like

  • Read a literal srcDir (and publicDir) from astro.config.{mjs,js,ts,mts}, default src.
  • Use it for entry_globs and for the root-relative URL lookup noted in language-support.md.
  • Update that sentence in the doc.

Tests

tests/unit/ingestion/test_astro_resolver.py: a custom srcDir and the default.

Dominant language
Python
Stars
7.1k
Forks
756
Avg merge
21h 5m
Merged PRs (30d)
797

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from repowise-dev/repowise

All issues in repowise-dev/repowise

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.