vuejs / vitepress

Vite & Vue powered static site generator.
https://vitepress.dev
MIT License
13.15k stars 2.12k forks source link

Content missing when being deployed to Vercel #3570

Closed CoolPlayLin closed 9 months ago

CoolPlayLin commented 9 months ago

Describe the bug

When I deployed my website to Vercel, I tried to access the website via specific url like https://rule.xfisxf.top/policy/charter.html to check out an article. But the content missed in less 1s and it threw framework.gkMttBBc.js:2 Hydration completed but contains mismatches. error in console.

image

Reproduction

Deploy website to Vercel

Expected behavior

Checked out complete content in browser

image

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (4) x64 Intel(R) Pentium(R) CPU GOLD 6500Y @ 1.10GHz
    Memory: 1.46 GB / 7.92 GB
  Binaries:
    Node: 18.19.0 - ~\scoop\apps\nvm\current\nodejs\nodejs\node.EXE
    Yarn: 1.22.21 - ~\scoop\apps\nvm\current\nodejs\nodejs\yarn.CMD
    npm: 10.2.5 - ~\scoop\apps\nvm\current\nodejs\nodejs\npm.CMD
    pnpm: 8.15.1 - ~\scoop\shims\pnpm.EXE
  Browsers:
    Edge: Chromium (121.0.2277.112), ChromiumDev (123.0.2380.1)
    Internet Explorer: 11.0.22621.1
  npmPackages:
    vitepress: 1.0.0-rc.42 => 1.0.0-rc.42

Additional context

The error only appears in production env.

Validations

liulyxandy-codemao commented 9 months ago

Might be a duplicate. https://github.com/vuejs/vitepress/issues/1143#issuecomment-1212374302 Take a look at this. Do you enable options like Auto Minify?

CoolPlayLin commented 9 months ago

I have found the reason which caused this issue: Cloudflare opened Auto Minify by default

Thanks for @liulyxandy-codemao 's point!