A
A
andrew_andrey2019-09-04 15:58:25
JavaScript
andrew_andrey, 2019-09-04 15:58:25

Prerender-spa-plugin, how to give prerenders only for the required routes?

Good afternoon.
Tell me about prerender-spa-plugin + vue-cli. I make pre-renders, for example, for two pages '/', '/about'. That is, dist is now index.html about.html app.html. From the server, I give all the statics like this app.use(express.static('/dist')). While there were no pre-renders, index.html was picked up and then vue-router was routed. Now, for a request of any kind /some/page, this pre-rendered index is always given first (although it is needed only for routes '/' '/index' and search engines, probably). At the same time, I do not get the /about - about.html route. The finished index.html is also given. How can I set up such routing in which index would be given only for the necessary routes and the same with about?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question