Default viewport tag is being appended to and not replaced whenever you use define your own custom viewport tag.
Define a simple _app.tsx that attempts to set a custom viewport meta tag.
import App from 'next/app'
import Head from 'next/head'
class MyApp extends App {
render() {
const { Component, pageProps } = this.props
return (
<>
<Head>
<title>Some Title</title>
<meta name="viewport" content="this-is-from-app.tsx" key="viewport" />
</Head>
<Component {...pageProps} />
</>
)
}
}
export default MyApp
I expected the default viewport tag to be deduplicated and replaced.

After doing some searching, it looks to me like the initial tag is coming from https://github.com/zeit/next.js/blob/2ba352da39ee00b6595aecdc9ffb2f103e803a85/packages/next/next-server/lib/head.tsx#L11-L23 and is not properly being deduplicated. It doesn't seem to matter if you define the same key.
Would like to work on this! Will investigate and send a PR.
Most helpful comment
Would like to work on this! Will investigate and send a PR.