本文介绍了同一域中的多个PWA的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在同一端点下托管多个PWA.假设我在root下有三个不同的PWA,然后root应该托管这3个PWA,这样当我通过链接或菜单切换到任何其他应用程序时,它不应在其他窗口中打开.当前,每当我单击其他应用程序时,它将在与Web应用程序不同的窗口中打开.

Is it possible to host multiple PWAs under same endpoint. Say, I have three different PWAs Under root and then root should host these 3 PWAs in such a way that when I switch to any other apps via link or menu it shouldn't open in different window. Currently, it is getting opened in different window as web app whenever, I am clicking on different app.

谢谢,拉胡尔

推荐答案

您可以参考.它表示您可以使用范围内的应用程序来完成此操作.

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

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

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

您仍然可以使用一个服务人员,但是每个子应用程序 路径中需要在结尾加上/ start_url/scope上班.

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.

这篇关于同一域中的多个PWA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-26 06:42
查看更多