From 5791dafcd138de2679a68ee1616f1b63109b0681 Mon Sep 17 00:00:00 2001 From: Stijnus <72551117+Stijnus@users.noreply.github.com> Date: Thu, 30 Jan 2025 23:57:57 +0100 Subject: [PATCH] Update uno.config.ts --- uno.config.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/uno.config.ts b/uno.config.ts index de78a552..780ffe24 100644 --- a/uno.config.ts +++ b/uno.config.ts @@ -1,13 +1,20 @@ import { globSync } from 'fast-glob'; import fs from 'node:fs/promises'; -import { basename, join } from 'node:path'; +import { basename, resolve } from 'node:path'; import { defineConfig, presetIcons, presetUno, transformerDirectives } from 'unocss'; import type { IconifyJSON } from '@iconify/types'; // Debug: Log the current working directory and icon paths console.log('CWD:', process.cwd()); -const iconPaths = globSync(join(process.cwd(), 'icons/*.svg')); +// Use resolve to get absolute path and normalize slashes +const iconsDir = resolve(process.cwd(), 'icons'); +const iconPaths = globSync('*.svg', { + cwd: iconsDir, + absolute: true, + onlyFiles: true, +}); + console.log('Found icons:', iconPaths); const collectionName = 'bolt';