Skip to content

fix(server): serve static assets with standard MIME types#2713

Open
Boyeep wants to merge 1 commit into
cloudflare:mainfrom
Boyeep:fix/static-asset-mime-types
Open

fix(server): serve static assets with standard MIME types#2713
Boyeep wants to merge 1 commit into
cloudflare:mainfrom
Boyeep:fix/static-asset-mime-types

Conversation

@Boyeep

@Boyeep Boyeep commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add standard MIME types for common web assets including WebAssembly, media, manifests, and documents
  • match file extensions case-insensitively across cached, filesystem, and image passthrough paths
  • make the existing WASM compression eligibility reachable by emitting application/wasm

Next.js parity

Next.js static serving delegates MIME lookup to its compiled send/mime database. This ports the relevant common web-asset behavior without adding a runtime dependency.

Test plan

  • pnpm test tests/static-file-cache.test.ts tests/serve-static.test.ts (76 passed)
  • staged vp check --fix passed

@pkg-pr-new

pkg-pr-new Bot commented Jul 26, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@vinext/cloudflare@2713
npm i https://pkg.pr.new/create-vinext-app@2713
npm i https://pkg.pr.new/@vinext/types@2713
npm i https://pkg.pr.new/vinext@2713

commit: 8163ecf

@github-actions

Copy link
Copy Markdown
Contributor

Performance benchmarks

Compared 8163ecf against base 05eee9f using alternating same-runner rounds. Next.js was unchanged and skipped.

0 improved · 1 regressed · 5 within ±1.5%

Scenario Framework Baseline Current Change
Client bundle size (gzip) vinext 132.4 KB 132.4 KB ⚫ -0.0%
Client entry size (gzip) vinext 119.7 KB 119.7 KB ⚫ -0.0%
Dev server cold start vinext 2.84 s 2.92 s 🔴 +2.7%
Production build time vinext 3.15 s 3.15 s ⚫ -0.0%
RSC entry closure size (gzip) vinext 103.3 KB 103.3 KB ⚫ +0.0%
Server bundle size (gzip) vinext 177.8 KB 177.8 KB ⚫ +0.0%

View detailed results and traces

🟢 improvement · 🔴 regression · ⚫ change below 1.5% · paired base/head

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