nodes/app/uno.config.ts

21 lines
468 B
TypeScript
Raw Normal View History

2024-04-18 18:39:24 +02:00
// uno.config.ts
import { defineConfig } from 'unocss'
import presetIcons from '@unocss/preset-icons'
import { presetUno } from 'unocss'
2024-04-26 01:13:08 +02:00
import fs from 'fs'
const icons = Object.fromEntries(fs.readdirSync('./src/lib/icons')
.map(name => [name.replace(".svg", ""), fs.readFileSync(`./src/lib/icons/${name}`, 'utf-8')]))
2024-04-18 18:39:24 +02:00
export default defineConfig({
presets: [
presetUno(),
2024-04-26 01:13:08 +02:00
presetIcons({
collections: {
custom: icons
}
}),
2024-04-18 18:39:24 +02:00
]
})