Git Product home page Git Product logo

Comments (3)

andy128k avatar andy128k commented on August 27, 2024

path configuration is an absolute path to an icons directory. In that regard assets/icons and /assets/icons are equivalent.

from favicons.

andsouto avatar andsouto commented on August 27, 2024

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 / both work exactly the same way.

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.

from favicons.

andy128k avatar andy128k commented on August 27, 2024

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".

from favicons.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.