astro-icon
Advanced tools
Comparing version 0.6.1 to 0.7.0
@@ -13,2 +13,3 @@ const AstroIcon = Symbol("AstroIcon"); | ||
const warned = new Set(); | ||
export async function getUsedSprites(result: any) { | ||
@@ -18,5 +19,8 @@ if (typeof result[AstroIcon] !== "undefined") { | ||
} | ||
throw new Error( | ||
`[astro-icon] <SpriteSheet> should be the very last child of the page's <body>!\nIs it currently placed before any <Sprite> components?` | ||
); | ||
const pathname = result._metadata.pathname; | ||
if (!warned.has(pathname)) { | ||
console.log(`[astro-icon] No sprites found while rendering "${pathname}"`); | ||
warned.add(pathname); | ||
} | ||
return []; | ||
} |
@@ -192,7 +192,3 @@ /// <reference types="vite/client" /> | ||
try { | ||
const files = import.meta.globEager(`/src/icons/**/*.svg`, { | ||
assert: { | ||
type: "raw", | ||
}, | ||
}); | ||
const files = import.meta.globEager(`/src/icons/**/*.svg`, { as: "raw" }); | ||
@@ -199,0 +195,0 @@ if (!(filepath in files)) { |
{ | ||
"name": "astro-icon", | ||
"version": "0.6.1", | ||
"version": "0.7.0", | ||
"type": "module", | ||
@@ -20,5 +20,9 @@ "exports": { | ||
"astro", | ||
"astro-component", | ||
"image", | ||
"images", | ||
"icon", | ||
"svg", | ||
"svgo" | ||
"icons", | ||
"iconify", | ||
"optimization" | ||
], | ||
@@ -25,0 +29,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29332