Skip to content

A sample project that demonstrates the "ChunkLoadError" when using the app router in a dockerized Next.js SPA with Nginx

Notifications You must be signed in to change notification settings

eide-1/sample-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sample-project

A sample project that demonstrates the "ChunkLoadError" when using the app router in a dockerized Next.js SPA with Nginx.

To run the project in a development environment:

  1. cd into the root directory of the project
  2. Run the following command (replace with your chosen container name):
 docker-compose -p <container-name> up --build

To run the project in a production environment:

  1. cd into the root directory of the project
  2. Run the following command (replace with your chosen container name):
 docker-compose -p <container-name> --file docker-compose.production.yaml up --build

The app router bug can only be observed in a production container.

Steps to Reproduce:

  1. Run the the project in a production environment
  2. Click on the "Go to Dynamic Route" button. You will be presented with an application error
  3. Right-click anywhere on the webpage and click "Inspect". The browser console will display the "ChunkLoadError"

About

A sample project that demonstrates the "ChunkLoadError" when using the app router in a dockerized Next.js SPA with Nginx

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published