0

I have different environment on which I'd like to test my manifest and my ServiceWorker howerver I can't find a way to have multiple manifest.json, one for each env.

Is there any way ?

Armaldio
  • 33
  • 1
  • 7
  • Does this answer your question? [Possible to have multiple \`manifest.json\` for PWA?](https://stackoverflow.com/questions/46203661/possible-to-have-multiple-manifest-json-for-pwa) – viam0Zah Oct 10 '22 at 06:07

1 Answers1

0

You can have your build process to pick appropriate manifest.json file during the build process. For example, if you are using webpack, you can write script to pick pr/manifest.json when you do pr build and qa/manifest.json when you do qa build.

Manifest is liked to your application by linking to your home page, say index.html. So you can also manipulate your script link tag to pick based on lcp. But this would be hacky and not a good idea. I would go with first option.

Hope this helps.

Anand
  • 9,672
  • 4
  • 55
  • 75
  • Unfortunately, we do not have webpack currently setup. We use meteor and deploy to galaxy, which make a local build and upload it – Armaldio Jun 18 '18 at 15:20
  • It doesn't matter what build process you use. You can pick your manifest file based on your build param with LCP. Its a common thing we do with any build tool. I just gave webpack as an example. – Anand Jun 18 '18 at 15:25