On Vue's official site, it gives a good and short example to show how to do ssr by vue.
(https://stackblitz.com/edit/vue-ssr-example-qaztqn?file=package.json
)
I copied this example to my local machine and ran it successfully.
However, after I tried to bundle vue locally by vite, I got the hydration mismatch error:
index.0977acf5.js:2980 Hydration completed but contains mismatches.
Before my change, the official example imports vue from CDN in it's index.html
. The only change I made is to bundle vue locally, then reference the whole bundled js file.
I uploaded my failed example to github: https://github.com/yangjiang3973/vue-ssr-demo
Can anyone take a look and tell me why this hydration error happen?
Thanks!