-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
44 lines (42 loc) · 1.14 KB
/
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
38
39
40
41
42
43
44
/// <reference types="vitest" />
import { defineConfig } from 'vite';
import dts from 'vite-plugin-dts';
import svgr from 'vite-plugin-svgr';
import cssInjectedByJsPlugin from 'vite-plugin-css-injected-by-js';
import { configDefaults } from 'vitest/config';
import { peerDependencies } from './package.json';
import tsconfigPaths from 'vite-tsconfig-paths';
export default defineConfig({
test: {
coverage: {
provider: 'istanbul',
reporter: ['text', 'json', 'html'],
enabled: true,
exclude: [
...configDefaults.exclude,
'src/stories/**',
'.storybook/**',
'tailwind.config.js',
'storybook-static/**',
'**/__test__/**',
],
},
globals: true,
environment: 'jsdom',
setupFiles: './setupTests.ts',
},
build: {
lib: {
entry: './src/index.ts',
name: 'InternxtUI',
fileName: (format) => `index.${format}.js`,
formats: ['cjs', 'es'],
},
rollupOptions: {
external: [...Object.keys(peerDependencies)],
},
sourcemap: true,
emptyOutDir: true,
},
plugins: [dts(), svgr(), cssInjectedByJsPlugin(), tsconfigPaths()],
});