This repository has been archived by the owner on Feb 18, 2024. It is now read-only.
html-loader: Add 'link:href' to attrs so favicons are parsed #943
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
By default
html-loader@0.x
has a defaultattrs
of['img:src']
, which means only<img src="...">
tags are followed when parsing the HTML:https://github.com/webpack-contrib/html-loader/blob/v0.5.5/README.md#usage
https://github.com/webpack-contrib/html-loader/blob/v0.5.5/index.js#L29
With this change, favicons are included too, and have all the benefits of being included in the webpack build - such as being being inlined by url-loader (if small enough), or else being copied to the output directory automatically and given hashed filenames.
This matches the default that will be used in
html-loader
v1.0.0:webpack-contrib/html-loader#17
...and saves projects from having to resort to the manual Neutrino API to adjust the options used by
html-loader
(see #682).