-
-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathvite.config.ts
More file actions
36 lines (34 loc) · 958 Bytes
/
vite.config.ts
File metadata and controls
36 lines (34 loc) · 958 Bytes
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
import { defineConfig } from 'vitest/config';
import { resolve } from 'path';
export default defineConfig({
// Library build configuration
build: {
lib: {
entry: resolve(__dirname, 'index.ts'),
name: 'd33d',
fileName: (format) => `d3-3d.${format === 'umd' ? 'js' : `${format}.js`}`,
formats: ['es', 'umd']
},
rollupOptions: {
external: [],
output: {
globals: {}
}
},
sourcemap: true,
outDir: 'build',
emptyOutDir: false
},
// Test configuration
test: {
globals: true,
environment: 'jsdom',
include: ['tests/**/*.test.ts'],
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html', 'lcov'],
include: ['src/**/*.ts', 'index.ts'],
exclude: ['tests/**', 'build/**', '**/*.d.ts']
}
}
});