npx create-razzle-app --example with-vue with-vue
cd with-vue
yarn start
This shows how to setup Vue with Razzle.
Here is a list of changes from Razzle's base template:
- Install
razzle-plugin-vue
,eslint-plugin-vue
as devDependencies. - Add
vue
to the razzle plugins config - Install
vue
,vue-server-renderer
as dependencies - Remove
react
,react-dom
,react-router-dom
entirely - Update
server/server.js
to usevue-server-renderer
'srenderToString
function. - Update
client.js
to mount Vue to#app
and start HMR