-
Notifications
You must be signed in to change notification settings - Fork 1
/
vite.config.ts
35 lines (32 loc) · 973 Bytes
/
vite.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import vueJsx from "@vitejs/plugin-vue-jsx";
import { resolve } from "path";
import path from "path";
import { fileURLToPath } from "url";
import unocss from "unocss/vite";
import { presetUno } from "unocss";
import transformerDirective from "@unocss/transformer-directives";
import { defaultTheme } from "brise-theme/preset.mjs";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
// https://vitejs.dev/config/
export default defineConfig({
root: "playground",
plugins: [
vue(),
vueJsx(),
unocss({
presets: [presetUno(), defaultTheme()],
transformers: [transformerDirective()],
}),
],
build: {
outDir: resolve(__dirname, "packages/theme"),
// https://cn.vitejs.dev/guide/build.html#library-mode
lib: {
entry: resolve(__dirname, "packages/theme/index.ts"),
formats: ["es"],
},
},
});