Skip to content

Commit

Permalink
fix: always ensureDir first
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re committed Dec 22, 2023
1 parent 838efd9 commit c52619e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/vite-plugin-astro-icon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ async function generateIconTypeDefinitions(
defaultPack = "local"
): Promise<void> {
const typeFile = new URL("./.astro/icon.d.ts", rootDir);
await ensureDir(new URL("./", typeFile));
const oldHash = await tryGetHash(typeFile);
const currentHash = collectionsHash(collections);
if (currentHash === oldHash) {
return;
}
await ensureDir(new URL("./", typeFile));
await writeFile(
typeFile,
`// Automatically generated by astro-icon
Expand Down

0 comments on commit c52619e

Please sign in to comment.