Follow the Vue SSR Guide to create a vue ssr demo project step by step.
have a try:
npm install
npm run build
npm run start
git checkout level1
npm run start
access: http://localhost:8080/
Features:
- index.html returned by server is pre-rendered.
- client-side hydration works. client-bundle take charge the page in the browser.
git checkout level2
access: http://localhost:8080/
Incremental Features:
- vue-router (sync component)
git checkout level3
access: http://localhost:8080/home
Incremental Features:
- vue-router (async component)
git checkout level4
access: http://localhost:8080/home
Incremental Features:
- pre-load data in server side with vuex
- serialize the store to index.html
- init client side store with the serialize data, then hydrate.
get checkout level5
access: http://localhost:8080/home
Incremental Features:
- handle the client side data fetch