-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Build warning /static/js/filename.chunk.js is 3.87 MB, and won't be precached. Configure maximumFileSizeToCacheInBytes to change this limit. #9987
Comments
I'm getting the same thing. Netlify is failing with it as an error due to warnings being considered errors in CI. Whilst being able to tweak the This won't help if chunking isn't possible but its aleast something to look at. |
Not sure if this is exactly what you mean, but I did change my routes to load using react.lazy - I thought that would cause different chunks to be created, it didnt help. Is there something else I can do to make the build create different sized chucks? |
@chanan When I swapped to using
to
Which is a massive difference. It only took adding a couple of |
I made the same change to load the routes using React.Lazy, but I still have the error sadly. EDIT: Strange I just looked at my build output, and I dont have all those small chunks even though I am using lazy routing as well:
EDIT 2: I only have 5 routes. But that doesnt explain why the main one is 637KB, also either way it should be 3.87 MB anyway, which is what the error message is saying. |
FYI, it looks like this is addressed in #10048. |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
Facing the same issues in deploying the app on netlify |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
any update? |
+1 |
any update? |
Describe the bug
After updating to v4.0.0 when I build I get the below warning, which causes the build to fail in CI environment:
The weird thing is that when I build, the output of the build command doesnt show the file to be that size
However, if I list the file directly it is much bigger than the build output says it is:
Did you try recovering your dependencies?
Yes. Deleted node_modules, yarn.lock - did not help
Which terms did you search for in User Guide?
n/a
Environment
Steps to reproduce
(Write your steps here:)
yarn build
Expected behavior
No warning should be outputted
Actual behavior
A warning is outputted from the build. In case of a CI the build is failed.
Reproducible demo
I can not share this project. I will try to create a blank one and see if I can recreate it.
The text was updated successfully, but these errors were encountered: