If you are running in the root of a site, for instance https://example.com/manifest.json
or https://test.example.com/manifest.json
you can use "start_url": "https://stackoverflow.com/"
.
However, this will also map https://example.com/test/manifest.json
to https://example.com/
, which fails because it’s in a folder outside the scope of the manifest.
Instead, if you are using a sub-directory you need to set both a scope
and the start_url
:
"start_url": "./"
"scope": "."
This will cause https://example.com/test/manifest.json
to map to https://example.com/test/
as expected.