Skip to content

Missing crossorigin attribute when generating HTML for font and fetch preloads #8

Description

@Botato300

When trying to preload fonts, I get the following warning in the DevTools console:

A preload for 'https://domain.test/build/assets/Poppins-C8OXljZJ.woff2' is found, but is not used because the request credentials mode does not match. Consider taking a look at crossorigin attribute.

This happens because font and fetch preloads require the crossorigin attribute on the <link> element.

Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/rel/preload#cors-enabled_fetches

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions