-
Notifications
You must be signed in to change notification settings - Fork 89
fix: Respect pageExtensions
config setting
#2073
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
fix: Respect pageExtensions
config setting
#2073
Conversation
👷 Deploy request for netlify-plugin-nextjs-static-root-demo pending review.Visit the deploys page to approve it
|
👷 Deploy request for netlify-plugin-nextjs-nx-monorepo-demo pending review.Visit the deploys page to approve it
|
👷 Deploy request for netlify-plugin-nextjs-next-auth-demo pending review.Visit the deploys page to approve it
|
✅ 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. |
✅ 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 next-plugin-edge-middleware ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for next-i18next-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
pageExtensions
config setting
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 👍
I added some unit tests to validate the behavior
Thanks for the PR @RohitRajendran! |
Hey @nickytonline / @LekoArts! Just curious if you had any idea when I could expect the next release? Would love to be able to start using scheduled functions with my project! 😀 |
Hey @RohitRajendran 👋🏼 this should now be fully rolled out. If you manually install the Next.js Runtime then you will need to update via NPM, otherwise the latest version should install during your next build. Thanks again for the PR! |
Thanks!! Got it working! 🙌🏽 |
Summary
When using the custom page extensions setting for Next.JS, you'll see errors during the onBuild event saying that it could not find the source file for your api routes. This causes things like scheduled functions not to work.
I've updated it so that it uses provided pageExtensions from the next config if available. If not, it will fallback to the previously used array for extensions.
Test plan
Relevant links (GitHub issues, Notion docs, etc.) or a picture of cute animal
Fixes #2072.
Standard checks:
🧪 Once merged, make sure to update the version if needed and that it was published correctly.