/vue-netlify-lambda-prerender

:vulcan_salute: Basic starter project for a prerendered Vue frontend with a Netlify lambda function backend

Primary LanguageJavaScript

vue-netlify-lambda-prerender

This is a basic starter project for a prerendered Vue frontend with a Netlify lambda function backend.

The Vue app is prerendered for improved SEO - you can learn more about server-side rendering and prerendering with Vue here. Includes vue-router, vuex, axios, the vue-cli-plugin-netlify-lambda, and the prerender-spa-plugin.

NOTE: this project can only be deployed via Netlify with continuous deployment enabled.

Project setup

yarn install

Compiles and hot-reloads for development

yarn run serve

Compiles and minifies for production

yarn run build

Run your tests

yarn run test

Lints and fixes files

yarn run lint

Customize configuration

See Configuration Reference.

Prerendering configuration

NOTE: for prerendering to work correctly, routes for those pages must be added to vue.config.js:

module.exports = {
  configureWebpack: {
    plugins: [
      new PrerenderSPAPlugin({
        staticDir: path.join(__dirname, 'dist'),
        routes: [
          '/',
          '/about',
        ],
      }),
    ],
  },
};