/
vite.config.ts
37 lines (36 loc) · 920 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
36
37
/// <reference types="vitest" />
/// <reference types="vite/client" />
import { defineConfig } from "vitest/config"
import react from "@vitejs/plugin-react"
import dts from "vite-plugin-dts"
import peerDepsExternal from "rollup-plugin-peer-deps-external"
// https://vitejs.dev/config/
export default defineConfig({
test: {
coverage: {
provider: "istanbul",
reporter: ["text", "html"],
exclude: ["src/shared/*", "src/utils/theme.utils.ts"],
},
globals: true,
environment: "jsdom",
css: true,
setupFiles: "./src/__tests__/setup.ts",
},
plugins: [react(), dts({ insertTypesEntry: true }), peerDepsExternal()],
build: {
lib: {
entry: "src/index.ts",
name: "Calendar",
fileName: "index",
},
rollupOptions: {
external: ["react", "react-dom"],
output: {
globals: {
react: "React",
},
},
},
},
})