使用 google 移动设备友好检查时 Next.js 不友好

use*_*950 5 mobile next.js

在使用 Google Mobile 进行测试时,我的网站不适合移动设备。但实际上,在访问它时,它是移动友好的。

我应该做什么来修复它?我正在使用 Next.js。

我测试时的结果:https://search.google.com/test/mobile-Friendly/result ?id=zwleJJ0VXRiIwFagHtBHuA

我的package.json

{
  "name": "tintuc",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev -p 8080",
    "build": "next build",
    "start": "next start -p 8080",
    "sitemap": "next-sitemap",
    "analyze": "cross-env ANALYZE=true next build",
    "analyze:server": "cross-env BUNDLE_ANALYZE=server next build",
    "analyze:browser": "cross-env BUNDLE_ANALYZE=browser next build",
    "find:unused": "next-unused",
    "depcheck": "npx depcheck"
  },
  "dependencies": {
    "@apollo/client": "^3.3.19",
    "@headlessui/react": "^1.4.1",
    "@heroicons/react": "^1.0.4",
    "date-fns": "^2.25.0",
    "deepmerge": "^4.2.2",
    "graphql": "^15.5.0",
    "highlight.js": "^11.6.0",
    "html-react-parser": "^3.0.4",
    "lodash": "^4.17.21",
    "next": "^12.2.5",
    "next-seo": "^4.28.1",
    "node-html-parser": "^5.0.0",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-loading-skeleton": "^2.2.0",
    "replace-special-characters": "^1.2.6"
  },
  "devDependencies": {
    "@next/bundle-analyzer": "^11.1.4",
    "@types/node": "^18.11.0",
    "@types/react": "^18.0.21",
    "autoprefixer": "^10.3.6",
    "next-pwa": "^5.6.0",
    "next-sitemap": "^3.1.29",
    "next-unused": "^0.0.6",
    "postcss": "^8.3.8",
    "tailwindcss": "^2.2.16"
  }
}
Run Code Online (Sandbox Code Playgroud)