Skip to content

MDzaja/next-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Encoded Chunk Fetch (Next.js + Bun)

A minimal Next.js app that attempts to fetch chunk files with encoded segments like:

/_next/static/chunks/app/%5BcountryCode%5D/(main)/page-23013a4bb4002868.js

Run locally (with Bun)

  1. Install deps:

    bun install
    
  2. Dev mode:

    bun run dev
    

    Visit http://localhost:3000/us

  3. Production build:

    bun run build
    bun run start
    

    Visit http://localhost:3000/us and the page will try to discover real built chunk files and fetch them.

Notes

  • The direct fetch uses a fixed hash (to show the exact path shape). It will likely 404 unless it coincidentally matches the actual build hash.
  • After a production build, /api/find-chunks scans .next/static/chunks/app/ to find real chunk files for [countryCode]/(main)/page-*.js and attempts to fetch them, reporting HTTP status codes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages