codeAdrian / gatsby-omni-font-loader

Font loader optimized for maximum performance. Removes render-blocking font resources and loads them asynchronusly. Handle FOUT & FOUC with font loading status watcher. Supports both local-hosted fonts and web fonts.
MIT License
106 stars 7 forks source link

Crossorigin value automatically assigned and the value is invalid. #36

Open sakihayashi opened 1 year ago

sakihayashi commented 1 year ago

When I analyzed my Gatsby website using omni font loader v2, I got an error crossorigin has an invalid value 'true' by HTML validator. It has to be 'anonymous' or empty.

There is not setting options for me to do with omni font loader for crossorigin but it renders 'true'.

<link rel="preconnect" href="https://fonts.googleapis.com" crossorigin="true"/> Can anyone tell me how to fix it and/or add an optional setting for crossorigin, please?

My configuration

    {
      resolve: `gatsby-omni-font-loader`,
      options: {
        enableListener: true,
        preconnect: [
          `https://fonts.googleapis.com`,
          `https://fonts.gstatic.com`,
        ],
        web: [
          {
            name: `Jost`,
            file: `https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap`,
          },
        ],
      },
    },

Thank you!