You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.
Presently sapper generates code to automatically register service-worker, if one exists. But We cannot pass custom parameters at time of registering. For example in this case we want to set scope value, so that we can mount app at custom mount point. But cannot be done now.
Describe the solution you'd like
Allow configurable service worker registration.
Additional context
Here seems the code that's registering service worker:
@antony setting baseUrl, currently configures only routes. But service worker scope being not derived from it. Thus It will be assumed ./ by browser, where start_url is root. And app is not being treated as pwa with following error.
Does not register a service worker that controls page and start_url
This page is controlled by a service worker,
however the `start_url` (https://r1.example.org/) is not in the service worker's scope (https://r1.example.org/mount_path/)
Ok, service worker seems registering at app_root by default itself. so it is proper behaviour only. problem lies in manifest.json, wher start_url is setted to absolute root instead of app root. I filed an issue at sapper-template here: sveltejs/sapper-template#255
And still, it will be great if we can configure service-worker in general.
Presently sapper generates code to automatically register service-worker, if one exists. But We cannot pass custom parameters at time of registering. For example in this case we want to set
scope
value, so that we can mount app at custom mount point. But cannot be done now.Describe the solution you'd like
Allow configurable service worker registration.
Additional context
Here seems the code that's registering service worker:
sapper/runtime/src/server/middleware/get_page_handler.ts
Line 290 in de87668
related: #744
The text was updated successfully, but these errors were encountered: