nodes/app/uno.config.ts
Max Richter d06b33f508
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 1m55s
feat: add icons
2024-04-26 01:13:08 +02:00

21 lines
468 B
TypeScript

// uno.config.ts
import { defineConfig } from 'unocss'
import presetIcons from '@unocss/preset-icons'
import { presetUno } from 'unocss'
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')]))
export default defineConfig({
presets: [
presetUno(),
presetIcons({
collections: {
custom: icons
}
}),
]
})