New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[3.0] not-found.js 3 MB in size #210
Comments
This should be the not-found page: https://github.com/payloadcms/payload/blob/beta/packages/next/src/views/NotFound/index.tsx |
@cbratschi on my end the built Served, it's less than 1B (same as you've pictured above): And running dev mode, my not-found page is only 3.1kB: If you can provide some clearer reproducible steps we can look into this further. |
I created a fresh installation with:
In my case the downloaded not-found.js was 3 MB, not the HTML page. This data gets loaded by the first request in dev mode. I am not accessing a missing page, just the Payload admin route. Will try it again using the latest Payload beta. |
Here are all the steps performed:
Sorted by file size: Still getting a 3 MB not-found.js file: http://localhost:3002/_next/static/chunks/app/(payload)/admin/%5B%5B...segments%5D%5D/not-found.js |
Link to reproduction
No response
Describe the Bug
Created a new project:
Loaded the admin panel and checked the network traffic. Saw that the not-found.js is 3 MB in size and therefore the largest downloaded file in dev mode. I guess Next.js bundles a lot of thing in this file. Please check why the not-found page is that large.
Sizes of other files:
After building the file is still quite large on first load but much lower than in dev mode:
Next.js always loads the not-found file in dev model. This large file could be responsible for higher startup times.
To Reproduce
See above.
Payload Version
3.0.0-beta.25
Adapters and Plugins
No response
The text was updated successfully, but these errors were encountered: