One Vaadin App with Multiple PWAs

Hi,

I get the exception message below when I tried to create 2 PWAs, i.e. use @PWA in 2 different classes, each for different URL paths. (www.example.com and www.example.com/users).

Exception:
com.vaadin.flow.server.InvalidRouteLayoutConfigurationException: Expected only one ‘PWA’ annotation that is placed on the main layout of the application. Got multiple annotations in ‘MainView’ and ‘MainView2’

is that another way to have multiple PWAs for one single application? is the @PWA the only way to create the PWA?
I want each service worker to have its own scope that uses the current url location of the service worker. Then, each of them will also have its own manifest file to set their name and icon. Is it possible to achieve this and how?

Hope someone can give me some guidance regarding this. Thanks.

Thank You in advance!
CJ

Vaadin has no bulit-in way of doing that.

You would have to split up the application into two separately deployed parts, or somehow define one of the service workers manually.

Leif Åstrand:
Vaadin has no bulit-in way of doing that.

You would have to split up the application into two separately deployed parts, or somehow define one of the service workers manually.

Hi, Thanks for your reply. I will try it