Skip to content

Revamp static assets#26

Merged
zth merged 2 commits into
mainfrom
revamp-static-assets
Mar 8, 2026
Merged

Revamp static assets#26
zth merged 2 commits into
mainfrom
revamp-static-assets

Conversation

@zth

@zth zth commented Mar 8, 2026

Copy link
Copy Markdown
Owner

No description provided.

@zth zth merged commit f92ce53 into main Mar 8, 2026
1 check passed
@zth zth deleted the revamp-static-assets branch March 8, 2026 21:12

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9f6b9f4a08

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread res-x-vite-plugin.mjs
Comment on lines +569 to +571
return ` ${JSON.stringify(routePath)}: {\n GET: new Response(Bun.file(${JSON.stringify(
filePath
)})${responseOptions}),\n HEAD: new Response(Bun.file(${JSON.stringify(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Generate handler routes instead of static Bun.file responses

getStaticAssetRoutesFileContent currently emits GET/HEAD entries as new Response(Bun.file(...)) static route values, which crashes server startup on Bun 1.2.x with TODOError: support Bun.file(path) in static routes (I reproduced this locally with Bun v1.2.14 using the same route shape). This means apps adopting this commit cannot boot in environments still on that Bun line; generating per-method handler functions that return new Response(Bun.file(...)) avoids the unsupported static-route code path while preserving behavior.

Useful? React with 👍 / 👎.

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