-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[code-infra] Fix nextjs build cache #43467
Conversation
Netlify deploy previewhttps://deploy-preview-43467--material-ui.netlify.app/ Bundle size report |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change makes sense to me. 👍
Thank you for handling it. 🙏
Let's test it and see if we can avoid the ocassional build failures. 🤞
Should I also update the version in package.json? 🤔
I think that it won't hurt bumping the version thus aligning it with @mui/material
. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Yes, removing the digests make sense. Still not 100% clear to me how this can cause the issue though. Next.js already only retains the .next/cache
folder during a build. It still feels to me like there's something going wrong around the github:
dependency.
Main changes:
docs/.next/cache
folder instead of the entiredocs/.next
folderhttps://github.com/netlify/next-runtime/blob/733a0219e5413aa1eea790af48c745322dbce917/src/build/cache.ts
digest
node_modules
-like folders, which contain an ungodly amount of filesdocs: https://github.com/netlify/build/blob/main/packages/cache-utils/README.md#digests
save/restore impl: https://github.com/netlify/build/blob/main/packages/cache-utils/src/main.ts
manifest impl: https://github.com/netlify/build/blob/main/packages/cache-utils/src/manifest.ts
onPostBuild
toonBuild
to be in par with the official next plugin.https://github.com/netlify/next-runtime/blob/733a0219e5413aa1eea790af48c745322dbce917/src/index.ts