Skip to content

fix(site): the generated context globs name a base the dev server accepts - #1375

Merged
alowpoly merged 1 commit into
mainfrom
fix/dev-glob-base
Oct 6, 2026
Merged

alowpoly merged 1 commit into
mainfrom
fix/dev-glob-base

Conversation

@alowpoly

@alowpoly alowpoly commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Change

Since #1358, astro dev cannot load a page. The generated modules site/prepared/prepared-context-objects.mts and site/prepared/prepared-context-json.mts pass base: '..' to import.meta.glob. The dev transform of Vite 8.2.2, the version Astro runs, refuses a base that does not start with /, ./ or ../. The dev server answers 500 for the module and the page ends with data-ready="error".

prepare-catalog.mts now writes base: '../' in its three globs. The glob keys do not change.

Evidence and limits

Proves the change:

  • The new test in body-additions.test.mts fails on main and passes here.
  • astro dev in headless Chromium. On main at bceb69c, /sun/ ends in data-ready="error". Here, /sun/, /earth/ and /saturn/ reach data-ready="true" with no failed response and no console error.
  • The dev server here emits 103 descriptor keys and 347 prepared-file keys, each ../src/objects/<id>/….
  • astro build here bundles both environments and writes 9,871 pages; its application-world-context chunk holds the same 103 keys.
  • main's build is not affected: Vite 8.2.2's build() output for the two modules is byte-identical for '..' and '../'.

Clean: ESLint on both files; 43 of 47 tests in the 9 test files that touch the generator, its output or its importers.

Pre-existing, identical on main:

Test file Failures Cause
site/application-world-resources.characterization.test.mts 4 of 4 Node 24 prints no TAP summary; fixed in #1377

Limit: after the local build reported complete, its process ran out of Node's default heap, which the deploy raises to 6144 MB. The steps after astro build did not run.

PR rules: titles, PDS4 provenance and ISO plain language.

@alowpoly
alowpoly enabled auto-merge October 6, 2026 00:56
@alowpoly
alowpoly merged commit c4eb3bd into main Oct 6, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant