Codemod verified
Regularly tested and maintained by our engineers and codemod expert community.
migration
by![](https://cdn.sanity.io/images/aho0e32c/production/61b763a05f41a7aea0b3b3265ff0fc83534ef28c-20x21.svg?w=20&fit=max&auto=format)
Codemod
Next/14/Metadata To Viewport Export
Last update
Jul 24, 2024
This codemod migrates certain viewport metadata to viewport
export.
Example
Before
export const metadata = {title: 'My App',themeColor: 'dark',viewport: {width: 1,},};
After
export const metadata = {title: 'My App',};export const viewport = {width: 1,themeColor: 'dark',};
Build custom codemods
Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community