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
Is your feature request related to a problem? Please describe. html-webpack-plugin supports setting a favicon using the favicon option. However setting that to the path to a file, results in it being copied to the output directory as-is, with no opportunity to customise any of:
the output filename (eg adding a hash) or location (eg to put under an assets/ subdirectory)
whether the icon is inlined or not
Describe the solution you'd like
It seems a simpler way to achieve the above than adding custom support (eg #986 or similar), would be to run the file specified under favicon through whatever webpack loader has been configured for that filetype.
That way users can say configure url-loader for *.ico in their webpack config as normal, setting the name and inline limit as desired, and html-webpack-plugin wouldn't have to handle the addFileToAssets() at all.
This would be similar to what html-loader does itself -- if it discovers resources in the HTML, it defers to whatever loaders are configured for them.
I thought many times about a good favicon integration.
Using a loader from a plugin requires a child compiler (which has performance impacts).
So I moved the favicons over to the favicons webpack plugin and I believe that it is still a good idea.
Unfortunately favicons requirements change over and over and over again because of new devices getting launched and new features are getting available.
So maintaining the plugin is very very time consuming and I can't handle it right now.
I have a roadmap for it but I would need help for that.
Is your feature request related to a problem? Please describe.
html-webpack-plugin
supports setting a favicon using thefavicon
option. However setting that to the path to a file, results in it being copied to the output directory as-is, with no opportunity to customise any of:assets/
subdirectory)Describe the solution you'd like
It seems a simpler way to achieve the above than adding custom support (eg #986 or similar), would be to run the file specified under
favicon
through whatever webpack loader has been configured for that filetype.That way users can say configure url-loader for
*.ico
in their webpack config as normal, setting thename
and inlinelimit
as desired, and html-webpack-plugin wouldn't have to handle theaddFileToAssets()
at all.This would be similar to what html-loader does itself -- if it discovers resources in the HTML, it defers to whatever loaders are configured for them.
Describe alternatives you've considered
favicons-webpack-plugin
, however it's not compatible with html-webpack-pluginv4 (Compatibility with HTML webpack plugin 4 alpha favicons-webpack-plugin#140), doesn't support data URIs either (
logo
key doesn't support data URIs favicons-webpack-plugin#60) and does a lot more than many users will need.Additional context
See also #364.
The text was updated successfully, but these errors were encountered: