-
Notifications
You must be signed in to change notification settings - Fork 20
Add generate{ImageMetadata,Sitemaps,StaticParams} to Next config [publish] #92
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
…maps, generateStaticParams Co-authored-by: ArnaudBarre <[email protected]>
@copilot Please don't add new tests, they are not useful |
Co-authored-by: ArnaudBarre <[email protected]>
Removed the test cases in commit |
|
||
## 0.4.24 | ||
|
||
- Add `"generateImageMetadata"`, `"generateSitemaps"` & `"generateStaticParams"` to `allowExportNames` in Next config |
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.
Copilot made a mistake adding allowExportNames
, but not a big deal.
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.
I don't see the issue, is there a typo I don't see?
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.
No, you are right. I read it wrong. Nothing to see 😆
Fixes the missing Next.js export names reported in the issue by adding support for three additional Next.js App Router API functions to the
allowExportNames
configuration in the Next.js config preset.Changes
Added the following export names to the Next.js config's
allowExportNames
array:generateImageMetadata
- Next.js function for generating image metadata in page/layout filesgenerateSitemaps
- Next.js function for generating sitemapsgenerateStaticParams
- Next.js function for generating static route parametersThese functions are part of Next.js's App Router API and can be exported alongside React components in page/layout files without triggering fast refresh issues.
Example Usage
With this change, the following code will no longer trigger an ESLint warning when using the Next.js config:
Testing
Fixes #91
Original prompt
Fixes #91
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.