Add generate{ImageMetadata,Sitemaps,StaticParams} to Next config [publish]#92
Merged
ArnaudBarre merged 3 commits intomainfrom Oct 15, 2025
Merged
Conversation
…maps, generateStaticParams Co-authored-by: ArnaudBarre <[email protected]>
Copilot
AI
changed the title
[WIP] Add missing only-export-components and allowExportNames
Add missing Next.js export names: generateImageMetadata, generateSitemaps, generateStaticParams
Oct 14, 2025
Owner
|
@copilot Please don't add new tests, they are not useful |
Co-authored-by: ArnaudBarre <[email protected]>
Contributor
Author
Removed the test cases in commit |
ArnaudBarre
approved these changes
Oct 15, 2025
ArnaudBarre
pushed a commit
that referenced
this pull request
Oct 15, 2025
thernstig
reviewed
Oct 15, 2025
|
|
||
| ## 0.4.24 | ||
|
|
||
| - Add `"generateImageMetadata"`, `"generateSitemaps"` & `"generateStaticParams"` to `allowExportNames` in Next config |
Contributor
There was a problem hiding this comment.
Copilot made a mistake adding allowExportNames, but not a big deal.
Owner
There was a problem hiding this comment.
I don't see the issue, is there a typo I don't see?
Contributor
There was a problem hiding this comment.
No, you are right. I read it wrong. Nothing to see 😆
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
allowExportNamesconfiguration in the Next.js config preset.Changes
Added the following export names to the Next.js config's
allowExportNamesarray: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.