Skip to content

Remove vite.base './' so dev emits absolute URLs - #141

Merged
kixelated merged 1 commit into
mainfrom
fix/dev-absolute-base
Sep 14, 2026
Merged

kixelated merged 1 commit into
mainfrom
fix/dev-absolute-base

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

vite.base './' (leftover from the initial Astro import, commit 23855ed) makes astro dev emit relative script URLs that break on nested pages: /blog/on-a-boat gets src=".//@vite/client", .//@fs/...dev-toolbar..., ./undefined, and .//src/layouts/... which 404/500, so HMR, the dev toolbar, and client scripts silently don't run.

Nothing depends on the relative base:

  • Cloudflare serves at root domains (moq.dev, new.moq.dev), not a subpath.
  • All layout/demo links are absolute (/layout/..., /demo, /watch, ...).
  • Production build output is unchanged: dist/demo/index.html and dist/blog/on-a-boat/index.html asset URLs are absolute /_astro/... before and after.

Verified with bunx astro dev that /blog/on-a-boat now loads /@vite/client (200) and /src/layouts/global.css (200), with no undefined srcs; bun run build exits 0 with identical demo/blog HTML asset URLs; bun run check is clean.

(written by muse-spark-1.3-contributor)

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-14T05:02:21.509877Z 478d162 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 7f15e8cf-7d11-4abe-9ca0-b912e34e81f3

📥 Commits

Reviewing files that changed from the base of the PR and between 8848bfd and 478d162.

📒 Files selected for processing (1)
  • astro.config.ts
💤 Files with no reviewable changes (1)
  • astro.config.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

The Vite configuration in astro.config.ts removes base: "./". Built asset URLs now use absolute paths from the site root instead of paths relative to the current page.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 478d1

The site is configured for root-domain deployment, so this asset URL configuration change has no concrete unresolved merge risk.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: removing vite.base: './' to produce absolute URLs during development.
Description check ✅ Passed The description directly explains the configuration change, the nested-page development failures it fixes, the production impact, and the verification results.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch fix/dev-absolute-base

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kixelated
kixelated merged commit 83b45de into main Sep 14, 2026
2 checks passed
@kixelated
kixelated deleted the fix/dev-absolute-base branch September 14, 2026 05:07
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