Skip to content

Latest commit

 

History

History
 
 

vue2-webpack-simple

Vue.js 2.0 Webpack Simple Template - Prerender SPA Example

Demonstrates usage of Vuejs 2.0 with Webpack 3. Build will populate dist/index.html with the prerendered page.

Build

npm install
npm run build

Now check the new dist directory for your prerendered static files!

To view the rendered files, install http-server (npm install -g http-server) if you haven't already and run it in the dist directory.

Now visit the following route in your browser (note the trailing slash):

Development

To edit the prerender-spa-plugin configuration, look for new PrerenderSPAPlugin in the plugins section of webpack.config.js.

If you're using a router or have more than one page to prerender, edit the routes array under that config object.

npm install
npm run dev