-
Notifications
You must be signed in to change notification settings - Fork 89
fix: resolve all pages using nft #1780
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
Conversation
✅ Deploy Preview for next-i18next-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for next-plugin-edge-middleware ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for netlify-plugin-nextjs-static-root-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
❌ Deploy Preview for nextjs-plugin-next-11-demo failed.
|
✅ Deploy Preview for netlify-plugin-nextjs-next-auth-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for nextjs-plugin-custom-routes-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for netlify-plugin-nextjs-nx-monorepo-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for netlify-plugin-nextjs-export-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for next-plugin-canary ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for netlify-plugin-nextjs-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
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.
Thanks for making the changes! 🚀
WTF Kodiak? |
Oh, it's because I mentioned in the other one that this PR fixes the test failure! GitHub thought I meant that that PR "fixes" this one |
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.
🚢
And it fixes the failing test! https://github.com/netlify/next-runtime/actions/runs/3481118957/jobs/5821791833 |
Summary
Currently we don't use Next.js's generated
js.nft.json
files when determining the dependencies for pages - we only use them for advanced API routes. Instead we directly trace the source files themselves. This means that we may miss some dependencies that Next.js knows about. For example, see #1776This PR changes the resolver to use nft.json files for everything, and refactors all of it to reuse a lot more of the logic and make it more testable. It adds some tests for the generated files - mainly to ensure that they actually exist.
It adds a demo page similar to the one in #1776, which has a static file read using fs.
Test plan
Relevant links (GitHub issues, Notion docs, etc.) or a picture of cute animal
Fixes #1776
Standard checks:
🧪 Once merged, make sure to update the version if needed and that it was published correctly.