kevinmarrec / nuxt-pwa-module

⚠️ DEPRECATED ⚠️ Zero config PWA solution for Nuxt 3
MIT License
338 stars 32 forks source link

Add 'differences to @nuxtjs/pwa' to README #49

Closed toniengelhardt closed 1 year ago

toniengelhardt commented 1 year ago

This section could be useful for people upgrading a Nuxt 2 project.

kevinmarrec commented 1 year ago

@toniengelhardt

As of https://pwa.nuxtjs.org/manifest in documentation and https://github.com/nuxt-community/pwa-module/blob/main/src/manifest.ts#L26 in the code itself, it seems it is pwa.manifest as well in Nuxt 2 PWA.

toniengelhardt commented 1 year ago

@kevinmarrec

Strange, in my Nuxt 2 project I have specified the manifest options at the config root for some reason and it seems to work. But if the docs for @nuxtjs/pwa are compatible I think this is not necessary.

kevinmarrec commented 1 year ago

@toniengelhardt I think it works cause of this : https://github.com/nuxt-community/pwa-module/blob/main/src/pwa.ts#L47 (Backward compatibility for top-level options)

IMO it's best to keep everything related to the module under the pwa configuration key, I'm not a fan having top level options because 1) it could conflict somehow with other modules at some point, 2) it won't benefit of Nuxt 3 TypeScript support for module options and 3) it does not seem to be mentioned in the Nuxt 2 documentation itself.

So let's keep as it is :)

toniengelhardt commented 1 year ago

@toniengelhardt I think it works cause of this : https://github.com/nuxt-community/pwa-module/blob/main/src/pwa.ts#L47 (Backward compatibility for top-level options)

IMO it's best to keep everything related to the module under the pwa configuration key, I'm not a fan having top level options because 1) it could conflict somehow with other modules at some point, 2) it won't benefit of Nuxt 3 TypeScript support for module options and 3) it does not seem to be mentioned in the Nuxt 2 documentation itself.

So let's keep as it is :)

I agree!

If Nuxt itself doesn't need any manifest options (which would require duplication) it should be forced to be under pwa settings.