Needs `as` attribute
Opened this issue · 1 comments
kurtextrem commented
See here: https://www.smashingmagazine.com/2016/02/preload-what-is-it-good-for/#loading-of-late-discovered-resources
If the as
attribute is omitted from the preload, it has lower priority or isn't even used at all (Chrome shows: was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it wasn't preloaded for nothing.
beheh commented
This seems to work for me locally. The plugin is choosing the attribute based on the extension:
resource-hints-webpack-plugin/index.js
Lines 7 to 17 in bbac509
And it's correctly set in the fixture (only for preload
though - prefetch doesn't have an as
attribute).