Next/14/Metadata To Viewport Export

1.0.2Last update Jan 10, 2025
by@Codemod
Next.js
migration

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