rishabh3112 / gridsome-plugin-pwa

PWA plugin for gridsome
MIT License
30 stars 18 forks source link

ReferenceError: options is not defined #3

Closed acidiney closed 5 years ago

acidiney commented 5 years ago

Hi,

I have installed this plugin in my gridsome app, and have configured. But when I run the command gridsome develop, I site starter blank and I receive this message

image

If I run gridsome build, this error message appears at the end of the process image

this is my plugin configuration:

plugins: [
    {
      use: 'gridsome-plugin-pwa',
      options: {
        title: 'Digital Factory',
        startUrl: '/',
        display: 'standalone',
        statusBarStyle: 'default',
        manifestPath: 'manifest.json',
        serviceWorkerPath: 'service-worker.js',
        shortName: 'Digital Factory',
        themeColor: '#000',
        backgroundColor: '#fdd348',
        icon: 'lgo.png'
      }
    }
  ]

I have created a service-worker,js and manifest.json in the static folder

Thanks

rishabh3112 commented 5 years ago

Hi @acidiney, thanks for reporting! Have pushed the patch to fix this and many other errors and available at v0.0.5. Few other issues for you to fix in your setup:

  1. Use location of icon relative to the root folder (not the src folder)
  2. manifest and service will be generated by the plugin itself.

Note: manifest and service worker will only be generated during production build.

Hopes that solves the issue. Keep giving feedbacks ;)