Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PWA broken in folder-based multi-tenant sites #44

Open
JimKerslake opened this issue Feb 23, 2023 · 3 comments
Open

PWA broken in folder-based multi-tenant sites #44

JimKerslake opened this issue Feb 23, 2023 · 3 comments
Assignees

Comments

@JimKerslake
Copy link
Collaborator

Service worker does not get installed in a folder based tenant site.
Some of the paths to endpoints that return JS that initialises the service worker are presumably not valid in folder tenant.

@JimKerslake
Copy link
Collaborator Author

#45

@JimKerslake
Copy link
Collaborator Author

Partly routing issue in consuming site:
AddPwaDefaultRoutes needs a folder route constraint passed in if you're using folders.

This enables the route {sitefolder}/serviceworker
which is named "folder-serviceworker"

This ends up in DefaultGeneratePwaInitScript
which appends into the generated JS:

script.Append("const wb = new Workbox('" + url + "',{scope: '" + scope + "'});");

...where url is the above route.

So workbox needs to be able to hit above route.

Also you need a trailing / for the scope PwaRouteNameProvider

@JimKerslake
Copy link
Collaborator Author

Believed fixed now - needs testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant