D
D
Danil Razumkov2018-07-19 20:32:48
Vue.js
Danil Razumkov, 2018-07-19 20:32:48

Convert vue.js site from SPA model to SSR?

The site was made on Vue.js, I forgot to check with the customer about the need for SEO on the site. I know that vue has ssr, nuxt.js The
question is, will the project have to be heavily shoveled for nuxt?
Are there alternatives to get search engines to index pages? Is it possible, axios in mounted(), to be executed synchronously so that the page is eventually readable for the robot?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Jhn Doe from, 2018-07-20
@spbislanders

about vue ssr:
webpack will have to be shoveled (but it happened to me and it was a hemorrhoid)
add a couple of files entry-server.js, entry-client.js
prerender on the server side:
1. https://github.com/vuejs/ vue-hackernews-2.0/blob/m...
client-side rendering:
2. https://github.com/vuejs/vue-hackernews-2.0/blob/m...
just specify which data to load for which component
3. https://github.com/vuejs/vue-hackernews-2.0/blob/m...
hope all libs in the project are ssr compatible

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question