Click on the Tauri, Vite, and Vue logos to learn more.
- -{{ greetMsg }}
{{ greetMsg }}
- diff --git a/src/main.ts b/src/main.ts index b670de8..cdf7a32 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,4 +1,7 @@ -import { createApp } from "vue"; -import App from "./App.vue"; +import { createApp } from 'vue' +import App from './App.vue' -createApp(App).mount("#app"); +import '@unocss/reset/tailwind.css' +import 'virtual:uno.css' + +createApp(App).mount('#app') diff --git a/uno.config.ts b/uno.config.ts new file mode 100644 index 0000000..c24d053 --- /dev/null +++ b/uno.config.ts @@ -0,0 +1,23 @@ +import { defineConfig, presetUno, presetIcons, transformerDirectives, transformerVariantGroup } from 'unocss' + +export default defineConfig({ + shortcuts: {}, + theme: { + colors: { + primary: 'var(--c-primary)' + } + }, + presets: [ + presetUno(), + presetIcons({ + prefix: '', + extraProperties: { + display: 'inline-block', + width: '1.125em', + height: '1.125em', + 'vertical-align': 'middle' + } + }) + ], + transformers: [transformerDirectives(), transformerVariantGroup()] +}) diff --git a/vite.config.ts b/vite.config.ts index ce8e371..76eada2 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,9 +1,10 @@ -import { defineConfig } from "vite"; -import vue from "@vitejs/plugin-vue"; +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' +import UnoCSS from 'unocss/vite' // https://vitejs.dev/config/ export default defineConfig(async () => ({ - plugins: [vue()], + plugins: [vue(), UnoCSS()], // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build` // @@ -15,7 +16,7 @@ export default defineConfig(async () => ({ strictPort: true, watch: { // 3. tell vite to ignore watching `src-tauri` - ignored: ["**/src-tauri/**"], - }, - }, -})); + ignored: ['**/src-tauri/**'] + } + } +}))