Stijnus commited on
Commit
5791daf
·
1 Parent(s): ec1bcb8

Update uno.config.ts

Browse files
Files changed (1) hide show
  1. uno.config.ts +9 -2
uno.config.ts CHANGED
@@ -1,13 +1,20 @@
1
  import { globSync } from 'fast-glob';
2
  import fs from 'node:fs/promises';
3
- import { basename, join } from 'node:path';
4
  import { defineConfig, presetIcons, presetUno, transformerDirectives } from 'unocss';
5
  import type { IconifyJSON } from '@iconify/types';
6
 
7
  // Debug: Log the current working directory and icon paths
8
  console.log('CWD:', process.cwd());
9
 
10
- const iconPaths = globSync(join(process.cwd(), 'icons/*.svg'));
 
 
 
 
 
 
 
11
  console.log('Found icons:', iconPaths);
12
 
13
  const collectionName = 'bolt';
 
1
  import { globSync } from 'fast-glob';
2
  import fs from 'node:fs/promises';
3
+ import { basename, resolve } from 'node:path';
4
  import { defineConfig, presetIcons, presetUno, transformerDirectives } from 'unocss';
5
  import type { IconifyJSON } from '@iconify/types';
6
 
7
  // Debug: Log the current working directory and icon paths
8
  console.log('CWD:', process.cwd());
9
 
10
+ // Use resolve to get absolute path and normalize slashes
11
+ const iconsDir = resolve(process.cwd(), 'icons');
12
+ const iconPaths = globSync('*.svg', {
13
+ cwd: iconsDir,
14
+ absolute: true,
15
+ onlyFiles: true,
16
+ });
17
+
18
  console.log('Found icons:', iconPaths);
19
 
20
  const collectionName = 'bolt';