Prerendering for SEO

If you want to prerender routes that will not significantly change once pushed to production, use this Webpack plugin: prerender-spa-plugin, which has been tested for use with Vue. For pages that do frequently change, Prerender.io and Netlify both offer plans for regularly re-prerendering your content for search engines.

Using prerender-spa-plugin

Install it as a dev dependency:

npm install --save-dev prerender-spa-plugin

Require it in build/webpack.production.js:

// This line should go at the top of the file where other 'imports' live invar PrerenderSpaPlugin = require('prerender-spa-plugin');

Configure it in the plugins array (also in build/webpack.production.js):