-
Notifications
You must be signed in to change notification settings - Fork 165
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
If a relative path is used for icons path, it is transformed to an absolute path #449
Comments
|
You are right, I think I was mixing things... But the problem is the generated manifest is always generated using an absolute path and there is no way to use a relative path. And a relative path makes sense as it is interpreted as relative to the manifest.webmanifest location. If the web app is deployed in a subpath and not in the / of an origin relative paths work but absolute paths don't. And if deployed in I'm fixing the problem doing this before writing the webmanifest to distk: if (file.name === 'manifest.webmanifest') {
const contents = file.contents.replaceAll('/assets/icons/', 'assets/icons/');
return fs.writeFile(`${path}/${file.name}`, contents);
} But I think it should be a cleaner way of doing this just by configuration. |
Things are a bit backwards here. A Manifest file is secondary to icons. Historically the library was designed around icons and whatever else (e.g. manifests) were "extra files to generate". |
I am using as configuration a relative value for path property:
But the generated
manifest.webmanifest
adds an initial/
. e.g.:Am I missing something or that
/
shouldn't be added? According to the specification if a relative path is used it is relative to the location of the webmanifest.The text was updated successfully, but these errors were encountered: