Fix font preloading causing errors on non-root deployments (#22714)

pull/22717/head
Michael Telatynski 2022-07-01 20:05:43 +01:00 committed by GitHub
parent 0baca38c31
commit 53ce8388f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -52,8 +52,8 @@
<% for (var i=0; i < htmlWebpackPlugin.tags.headTags.length; i++) { <% for (var i=0; i < htmlWebpackPlugin.tags.headTags.length; i++) {
var tag = htmlWebpackPlugin.tags.headTags[i]; var tag = htmlWebpackPlugin.tags.headTags[i];
var path = tag.attributes && tag.attributes.href; var path = tag.attributes && tag.attributes.href;
if (path.indexOf("Inter") !== -1) { %> if (path.includes("/Inter/")) { %>
<link rel="preload" as="font" href="<%= path %>" crossorigin="anonymous"/> <link rel="preload" as="font" href=".<%= path %>" crossorigin="anonymous"/>
<% } <% }
} %> } %>