Transform your existing Nuxt.js app to PWA

tajeddine

Tajeddine Alaoui

Posted on January 14, 2021

Transform your existing Nuxt.js app to PWA

Let's go the terminal and type:

yarn add --dev @nuxtjs/pwa
Enter fullscreen mode Exit fullscreen mode

or

npm i --save-dev @nuxtjs/pwa
Enter fullscreen mode Exit fullscreen mode

Once finished installing, go to nuxt-config.js and add the following

modules: ["@nuxtjs/pwa"],
Enter fullscreen mode Exit fullscreen mode

Now you're app have pwa technology, We only need to override default values.

 // nuxt-config.js
  manifest: {
    icon: {
      // Add path to the app icon
      iconSrc: '',
    },
    // Short name of your app
    short_name: '',
    // Name of your app
    name: 'Chocoreto',
    // Add descreption
    descreption: '',
    start_url: '/',
    theme_color: '#fff',
    background_color: '#000',
  },

Enter fullscreen mode Exit fullscreen mode

And voila !

💖 💪 🙅 🚩
tajeddine
Tajeddine Alaoui

Posted on January 14, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Transform your existing Nuxt.js app to PWA
programming Transform your existing Nuxt.js app to PWA

January 14, 2021