Support viewport export via TS Plugin (#57554)

### 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
This commit is contained in:
Dak Washbrook 2023-10-29 17:59:47 -07:00 committed by GitHub
parent d88d8aed36
commit 24a71dcd72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,6 +15,8 @@ export const ALLOWED_EXPORTS = [
'generateStaticParams',
'metadata',
'generateMetadata',
'viewport',
'generateViewport',
]
export const LEGACY_CONFIG_EXPORT = 'config'