Multiple PWAs in the same domain

旧城冷巷雨未停 提交于 2019-12-06 07:50:54

You may refer with this thread. It stated that you can accomplish this with scoped apps.

Update your manifest files to include a scope parameter with a value of the path that "app" should be served under.

"scope": "/r/aizumap/",

and

"scope": "/r/naramap/",

You can still be able to use a single service worker but each sub app will need to have a trailing / in it's path for the start_url/scope to work.

Here's a sample and a source which might also help.

You can have multiple PWA when you can

1) Split the app into multiple web app to have one Manifest.json and one service worker for each of them.

2) Host it under different URL

You can't have more than one PWA when you have only one Manifest and one SW registered for one path, as these two things essentially defines a unique PWA with a unique scope(URL under which the app is accessible)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!