-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
43 lines (42 loc) · 1.04 KB
/
vite.config.js
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
36
37
38
39
40
41
42
43
/// <reference types="vitest" />
import {resolve} from "path"
import {defineConfig} from "vite"
import vue from "@vitejs/plugin-vue"
import dts from "vite-plugin-dts"
import {fileURLToPath, URL} from "node:url"
// https://vitejs.dev/config/
export default defineConfig({
build: {
copyPublicDir: false,
lib: {
entry: resolve(__dirname, "lib/main.ts"),
formats: ["es"],
name: "Vuestrap",
fileName: "vuestrap-bootstrap",
},
rollupOptions: {
external: ["vue"],
output: {
globals: {
vue: "Vue",
}
}
}
},
plugins: [
vue(),
dts({include: ["lib"], rollupTypes: true}),
],
resolve: {
alias: {
"@lib": fileURLToPath(new URL("./lib/main.ts", import.meta.url)),
}
},
test: {
environment: "happy-dom",
coverage: {
provider: "v8",
reporter: ["text", "json-summary", "json"],
},
}
})