-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
hydration mismatch when using auto minify #369
Comments
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
2 similar comments
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
Are you using Cloudflare's Auto Minify feature? You can try to turn it off to see. |
@brc-dd Also! After off html (like say @kecrily ) - the web site work fine! |
Cloudflare's minimilize removes comments in html that make sense to vue. Might need to add this to the documentation. |
So this is an issue only with "auto minify" features of cloudflare, etc. right? Not with |
Hydration completed but contains mismatches
error and the index page cannot be rendered.
Hmm, Yes.. |
This issue is actually mentioned here too: https://vite-plugin-ssr.com/hydration-mismatch#common-causes-solutions
Here is in-depth explanation: https://www.endpointdev.com/blog/2019/06/cloudflare-vue-ssr-significant-comments/
I guess we should just add this to docs then as it cannot be fixed, at least for now. Adding a note here would be sufficient. |
close #369 Co-authored-by: Kia King Ishii <[email protected]>
* refactor: refine global layout system * chore: remove unknown console log from release script * release: v1.0.0-alpha.2 * docs: add Layer0 deployment notes Co-authored-by: meteorlxy <[email protected]> * docs: add cloudflare pages deploy (#797) close #369 Co-authored-by: Kia King Ishii <[email protected]> * refactor: improve site data parsing (#780) * fix: copy code in non-secure contexts (#792) Co-authored-by: Divyansh Singh <[email protected]> * fix(theme): add italic fonts (#759) (#777) fix #759 * docs: image migration guide for vuepress (#799) * refactor(types): use built-in utility type `Awaited` (#801) instead of explicitly defining it. (introduced in TS 4.5) * feat(theme): support themeable images for logo and hero (#745) Co-authored-by: Divyansh Singh <[email protected]> Co-authored-by: Kia King Ishii <[email protected]> Co-authored-by: Rishi Raj Jain <[email protected]> Co-authored-by: meteorlxy <[email protected]> Co-authored-by: Percy Ma <[email protected]> Co-authored-by: Linmj <[email protected]> Co-authored-by: JD Solanki <[email protected]> Co-authored-by: CHOYSEN <[email protected]> Co-authored-by: Anthony Fu <[email protected]>
Describe the bug
I built and published vitepress pages to my server, but got
Hydration completed but contains mismatches
error when i review, and the index page rendered nothing but blank, and other pages show correctlly.But it runs perfectly on my local within dev mode
Reproduction
run npm docs:build
and wait.Expected behavior
the index page displays correctlly.
System Info
System: OS: macOS 11.4 CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz Memory: 1.22 GB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 14.15.1 - /usr/local/opt/nvm/versions/node/v14.15.1/bin/node Yarn: 1.22.10 - /usr/local/opt/nvm/versions/node/v14.15.1/bin/yarn npm: 6.14.8 - /usr/local/opt/nvm/versions/node/v14.15.1/bin/npm Browsers: Chrome: 92.0.4515.131 Safari: 14.1.1 npmPackages: vitepress: ^0.16.1 => 0.16.1
Additional context
I do get some warning when runing build process, my vue components library depends to PDF.js and some of my customized directives are using
document
for creting DOM, I'm not sure if it due to SSR of vitpress.And following are the configuration of my vitepress project.
docs/.vitepress/config.js
docs/.vitepress/theme/index.js
Validations
The text was updated successfully, but these errors were encountered: