Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

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

Closed
wants to merge 1 commit into from

Conversation

toniengelhardt
Copy link
Contributor

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

This section could be useful for people upgrading a Nuxt 2 project.
@kevinmarrec
Copy link
Owner

@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
Copy link
Contributor Author

@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
Copy link
Owner

kevinmarrec commented Oct 12, 2022

@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
Copy link
Contributor Author

@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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants