✅ Quick Setup

  1. Install npm package:
yarn add @nuxtjs/pwa
  1. Edit your nuxt.config.js file to add pwa module:
{
    modules: [
        '@nuxtjs/pwa',
    ],
}
  1. Ensure static dir exists and optionally create static/icon.png. (Recommended to be square png and >= 512x512px)

  2. Create or add this to .gitignore:

sw.*

PWA module is a collection of smaller modules that are designed to magically work out of the box together. To disable each sub-module, you can pass false option with it's name as key. For example to disable icon module:

modules: [
    ['@nuxtjs/pwa', { icon: false }],
],

Also each sub-module has it's own configuration. Continue reading docs for detailed info.

results matching ""

    No results matching ""