Skip to content

Commit

Permalink
Support viewport export via TS Plugin (#57554)
Browse files Browse the repository at this point in the history
### What?

The Next.js TS Plugin generally supports the named exports for the pages and layouts.
Currently the TS Plugin doesn't support the new viewport export.

See: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#use-viewport-export

### How?

Added the `viewport` export to the `constants.ts`.

Closes #57680
  • Loading branch information
Vinlock committed Oct 30, 2023
1 parent d88d8ae commit 24a71dc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/next/src/server/typescript/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export const ALLOWED_EXPORTS = [
'generateStaticParams',
'metadata',
'generateMetadata',
'viewport',
'generateViewport',
]

export const LEGACY_CONFIG_EXPORT = 'config'
Expand Down

0 comments on commit 24a71dc

Please sign in to comment.