-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
34 lines (33 loc) · 906 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
/// <reference types="vitest" />
import mixexport from '@mnrendra/rollup-plugin-mixexport';
import { resolve } from 'path';
import esbuild from 'rollup-plugin-esbuild';
import { defineConfig } from 'vite';
import dts from 'vite-plugin-dts';
export default defineConfig({
test: {
coverage: {
provider: 'istanbul',
},
testTimeout: 0,
},
build: {
target: 'es6',
minify: false,
lib: {
// Could also be a dictionary or array of multiple entry points
entry: resolve(__dirname, './src/index.ts'),
fileName: 'index',
formats: ['es', 'cjs'],
},
rollupOptions: {
plugins: [esbuild(), mixexport()],
onwarn({ code }) {
if (code === 'MIXED_EXPORTS') return false; // to disable Rollup's 'MIXED_EXPORTS' warning log
return undefined;
},
},
ssr: true,
},
plugins: [dts({ exclude: ['**/*.test.ts'] })],
});