Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

allow outputted file name to include prefix #145

Open
o2dazone opened this issue Dec 4, 2018 · 1 comment
Open

allow outputted file name to include prefix #145

o2dazone opened this issue Dec 4, 2018 · 1 comment
Labels
feature New feature or request

Comments

@o2dazone
Copy link

o2dazone commented Dec 4, 2018

Coming from favicons-webpack-plugin, the prefix configuration key allowed us to prepend the filename with a file hash. This let us, from a glance, determine if the favicons were properly cachebusted, but it also allowed us to dump multiple versions of a favicon into the same S3 assets directory. The application I'm building is multi-tenant, so these versions may differ drastically. Is there any desire to support an extra key or an ability to hash filenames on export?

favicons-webpack-plugin
dist/assets/abc123-favicon.png
dist/assets/xyz456-favicon.png

webapp-webpack-plugin
dist/assets/xyz456/favicon.png
dist/assets/abc123/favicon.png

@brunocodutra
Copy link
Owner

webapp-webpack-plugin doesn't support this because favicons itself doesn't.

favicons-webpack-plugin attempted to work around this limitation using a naive regex that fails to fix the various manifest files and also some html meta tags that contain references to files in attributes other than href, essentially producing broken output. I attempted to put together a more sophisticated regex to cover all edge cases in the past, but I eventually realized that this was just bad engineering and decided to remove this [mis]feature until it's supported upstream.

Patching favicons certainly isn't too difficult, I just never got to find the time to do it. If you don't mind, I'll leave this issue open as a reminder.

@brunocodutra brunocodutra added the feature New feature or request label Dec 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants