From 3cf8a6e98a76f2159f91ef002c53da7dbb26fba0 Mon Sep 17 00:00:00 2001 From: sryung Date: Sun, 21 Apr 2024 20:15:28 +0900 Subject: [PATCH] =?UTF-8?q?[=F0=9F=9A=A8=20fix]=20viewport=20meta=20?= =?UTF-8?q?=EA=B2=BD=EA=B3=A0=20=ED=95=B4=EA=B2=B0=EC=9D=84=20=EC=9C=84?= =?UTF-8?q?=ED=95=9C=20=ED=83=9C=EA=B7=B8=20=EC=9C=84=EC=B9=98=20=EC=9D=B4?= =?UTF-8?q?=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Warning: viewport meta tags should not be used in _document.js's . https://nextjs.org/docs/messages/no-document-viewport-meta - viewport를 _document.js 에서 작성하는 경우 예상치 못한 결과를 얻을 수 있으니 _app.js 에서 작성하길 권장 --- src/pages/_app.tsx | 7 +++++++ src/pages/_document.tsx | 4 ---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 89526940..e96d6b26 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -5,6 +5,7 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { useState, useEffect } from 'react'; import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; import { useRouter } from 'next/router'; +import Head from 'next/head'; import Script from 'next/script'; import theme from '@/styles/theme'; import global from '@/styles/global'; @@ -36,6 +37,12 @@ export default function App({ Component, pageProps }: AppProps) { {process.env.NODE_ENV === 'production' && ( <> + + +