kevinmarrec/nuxt-pwa-module

Manifest properties don't default as expected

Opened this issue · 0 comments

tmlmt commented

Hi @kevinmarrec, see repro here: https://stackblitz.com/edit/nuxt-starter-ufzybv
3 issues at least:

  • The name doesn't default to the name property of package.json. The title defaults to "Nuxt PWA" although we're not seeking any hypothetical effect of a manifest property set outside of pwa like in #47
  • The short_name doesn't default to the same name property as advertised in the docs
  • The description doesn't default to the description property of package.json

nuxt.config.ts:

  modules: ['@kevinmarrec/nuxt-pwa'],
  pwa: {
    icon: false,
    workbox: false,
    meta: false,
  },

package.json:

{
  "name": "stackblitz",
  "description": "My description",
  "private": true,
  "scripts": {
    "build": "nuxt build",
    "dev": "HOST=0.0.0.0 nuxt dev",
    "generate": "nuxt generate",
    "preview": "nuxt preview",
    "postinstall": "nuxt prepare"
  },
  "devDependencies": {
    "@kevinmarrec/nuxt-pwa": "^0.17.0",
    "@types/node": "^18",
    "nuxt": "^3.4.3"
  }
}

resulting manifest.json:

{
  "name": "Nuxt PWA",
  "short_name": "",
  "description": "",
  "lang": "en",
  "start_url": "/?standalone=true",
  "display": "standalone",
  "background_color": "#ffffff",
  "theme_color": "#000000",
  "icons": []
}