nuxt-community / pwa-module

Zero config PWA solution for Nuxt.js
https://pwa.nuxtjs.org
MIT License
1.23k stars 171 forks source link

Cannot make pwa module work properly #502

Closed ghisleouf closed 2 years ago

ghisleouf commented 2 years ago

Hi guys,

I'm facing an issue about making this module work properly. Currently, when testing with Lighthouse, it is saying "No manifest was fetched"

I setup the module very quickly with the following nuxt.config.js :

export default {
  // Target: https://go.nuxtjs.dev/config-target
  target: 'static',

then adding the module into buildModule section:

 buildModules: [
    '@nuxtjs/pwa',
    '@nuxt/typescript-build',
    '@nuxtjs/composition-api/module',
    'nuxt-graphql-request',
    '@nuxt/image',
    '@nuxtjs/tailwindcss',
    [
      '@nuxtjs/markdownit', {
        runtime: true
      }
    ],
    // https://i18n.nuxtjs.org/
    [
      '@nuxtjs/i18n', {
        baseUrl: `https://${process.env.URI_AUTHORITY}`,
        defaultLocale: 'en',
        locales: ['sv', 'en'],
        strategy: 'prefix_except_default',
        vueI18n: {
          messages
        },
        seo: false
      }
    ],
    '@nuxtjs/google-fonts'
  ],

and finally, some module dedicated config:

  pwa: {
    manifest: {
      name: 'My PWA',
      short_name: "My PWA",
      useWebmanifestExtension: true,
      display: 'standalone',
      theme_color: '#ffffff',
      start_url: "/?standalone=true"
    },
    workbox: {
      dev: process.env.NODE_ENV !== 'production'
    }
  },

the config is pretty straightforward.

Am I missing something ?

Thanks a lot for your very precious help :)

ghisleouf commented 2 years ago

Nevermind, after struggling a lot, it seems to be related to my Chrome browser which was not loading my manifest properly and failing Lighthouse test.

Sorry about that.