Next.js
migration
byCodemod

Next/14/Metadata To Viewport Export

/icons/calendar.svg

Last update

Apr 23, 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

background illustrationGet Started Now