依据官方文档和官方Demo写出来的 Vue 服务端渲染 Deme。仅保留基础功能,包含大量注释。方便学习服务端渲染原理。(值得注意的是使用的使 webpack 3)
- Vue + vue-router + vuex working together
- Server-side data pre-fetching
- Client-side state & DOM hydration
- Hot-reload in development
请配合官方文档食用
# install dependencies
yarn
# serve in dev mode, with hot reload at localhost:8111
npm run dev
# build for production
npm run build
# serve in production mode
npm server