unocss/uno.config.ts

25 lines
695 B
TypeScript
Raw Normal View History

2023-07-13 12:30:34 +08:00
// uno.config.ts
import { defineConfig } from 'unocss'
import presetRemToPx from '@unocss/preset-rem-to-px'
import presetUno from '@unocss/preset-uno'
import presetWebFonts from '@unocss/preset-web-fonts'
import axios from 'axios'
export default defineConfig({
presets: [
presetWebFonts({
provider: "google",
customFetch: (url: string) => axios.get(url,).then(it => it.data),
fonts: {
Ubuntu: "Ubuntu",
sans: 'Roboto',
mono: ['Fira Code', 'Fira Mono:400,700'],
},
}),
presetUno(),
presetRemToPx(),
],
rules: [
['m-1', { margin: '1px' }]
],
})