Closed gingershaped closed 11 months ago
Hello @GingerIndustries,
thank you for the issue report. I wil fix it.
it is a really special use case <link rel="icon">
or it's an user error? Should be this tag ignored or should an exception occur?
it is a really special use case
<link rel="icon">
or it's an user error? Should be this tag ignored or should an exception occur?
I'm of the opinion that if the plugin is enabled but the page lacks a favicon it's an error, since why would they have the plugin if they didn't have a favicon to use it with?
I'm of the opinion that if the plugin is enabled but the page lacks a favicon it's an error, since why would they have the plugin if they didn't have a favicon to use it with?
yes/no
All use cases such as <link rel="icon">
or <link invalid-href="./favicon.png" rel="icon" />
or the link tag is missing are the same. The plugin doesn't analyse whether any <link>
tag exists or not in HTML. The plugin detect and resolve only attributes (href, src, etc) by tags. If any resolvable attribute is missing, then plugin do nothing, HTML stay as is.
Also, I will resolve this case (Favicon file is not found
) w/o an exception.
But I can display a warning in the console without breaking compilation, for example:
Warning
Favicon file is not found! If the
FaviconsBundlerPlugin
is used, at last one favicon source file should be defined in the template, e.g.:<link rel="icon" href="path/to/source/favicon.png">
@GingerIndustries
the crashing is fixed, in this case will be display a warning.
Please check the version 3.4.3
.
Cool, thanks!
Current behaviour
If the HTML file does not include a
<link rel="icon">
tag and theFaviconBundlerPlugin
is enabled, webpack crashes with the following traceback:Expected behaviour
The plugin should probably throw an error explaining that the file lacks a
link
tag.Reproduction Example
Create an HTML file without a
<link rel="icon">
tag, enable theFaviconBundlerPlugin
, and attempt to bundle it with theHtmlBundlerWebpackPlugin
.Environment