preload-webpack-plugin icon indicating copy to clipboard operation
preload-webpack-plugin copied to clipboard

ability to remove crossorigin

Open Coding-Kiwi opened this issue 5 years ago • 0 comments

No idea what I'm doing wrong but if I want to preload local fonts, it adds "crossorigin='anonymous'" to the link tag:

<link as="font" crossorigin="anonymous" href="static/fonts/0e96b9ec74a14d59625ae92ff6a5e50e.woff2" rel="preload">

that causes a A preload for '<URL>' is found, but is not used because the request credentials mode does not match. Consider taking a look at crossorigin attribute. warning in the console and the font is not preloaded.

When I add the link manually and remove the crossorigin attribute, the font gets preloaded once correctly without warnings.

Sadly there is no option to remove the crossorigin attribute.

Also the mime type is missing https://developer.mozilla.org/en-US/docs/Web/HTML/Preloading_content#Including_a_MIME_type

Coding-Kiwi avatar Apr 23 '20 12:04 Coding-Kiwi