vite-plugin-fonts
Advanced tools
Comparing version
@@ -35,3 +35,3 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/google-fonts.ts | ||
if (typeof styles === "string") | ||
spec += `:${encodeURIComponent(styles)}`; | ||
spec += `:${styles}`; | ||
if (defer) | ||
@@ -43,3 +43,3 @@ deferedSpecs.push(spec); | ||
} | ||
if (preconnect && specs.length + deferedSpecs.length > 0) | ||
if (preconnect && specs.length + deferedSpecs.length > 0) { | ||
tags.push({ | ||
@@ -50,5 +50,6 @@ tag: "link", | ||
href: "https://fonts.gstatic.com/", | ||
crossorigin: "" | ||
crossorigin: true | ||
} | ||
}); | ||
} | ||
if (deferedSpecs.length > 0) { | ||
@@ -99,3 +100,3 @@ let href = `${GoogleFontsBase}?family=${deferedSpecs.join("&family=")}`; | ||
} | ||
if (defer) | ||
if (defer) { | ||
tags.push({ | ||
@@ -110,3 +111,3 @@ tag: "link", | ||
}); | ||
else | ||
} else { | ||
tags.push({ | ||
@@ -119,2 +120,3 @@ tag: "link", | ||
}); | ||
} | ||
return tags; | ||
@@ -121,0 +123,0 @@ } |
{ | ||
"name": "vite-plugin-fonts", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "Webfont loader for vite", | ||
@@ -5,0 +5,0 @@ "author": "stafyniaksacha", |
Sorry, the diff of this file is not supported yet
295
1.37%10374
-0.04%