Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: viewport meta tags should not be used in _document.js's <Head>. https://err.sh/next.js/no-document-viewport-meta #2

Closed
Rashmi-278 opened this issue Nov 7, 2020 · 0 comments

Comments

@Rashmi-278
Copy link
Contributor

This warninng is resolved by following this solution mentioned in vercel/next.js#13230

comment out the meta tag in _document.js (where { Head } is imported from "next/document")...

{/* */} ...and add it in a new Head component in index.js (importing Head from "next/head")...

export default () => (
<>





</>
)
...it works correctly! Only the correct viewport element shows up on the page.

vercel/next.js/issues/13230

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant