We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 029401e + cc4b416 commit eda3c6dCopy full SHA for eda3c6d
src/generate-icon-fonts/svg-to-font.ts
@@ -1,4 +1,4 @@
1
-import { fileURLToPath } from 'node:url';
+import { fileURLToPath } from "node:url";
2
import path from "node:path";
3
4
import svgtofont from "svgtofont";
@@ -18,7 +18,14 @@ const svgToFont = async (
18
lastSlashIndex = fileName.lastIndexOf("/");
19
}
20
21
- const generateIconFontsDir = fileName.slice(0, Math.max(0, lastSlashIndex));
+ let generateIconFontsDir = fileName.slice(0, Math.max(0, lastSlashIndex));
22
+
23
+ if (generateIconFontsDir.endsWith("generate-icon-fonts")) {
24
+ generateIconFontsDir = generateIconFontsDir.replace(
25
+ "generate-icon-fonts",
26
+ "",
27
+ );
28
+ }
29
30
try {
31
return svgtofont({
0 commit comments