forked from evilmartians/figma-polychrom
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvite.config.api.ts
36 lines (35 loc) · 857 Bytes
/
vite.config.api.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
/// <reference types="vitest" />
import { defineConfig } from 'vite';
import { resolve } from 'path';
export default defineConfig({
resolve: {
alias: {
'~api': resolve(__dirname, 'src', 'api'),
'~test-utils': resolve(__dirname, 'src', 'test-utils'),
'~types': resolve(__dirname, 'src', 'types'),
'~utils': resolve(__dirname, 'src', 'utils'),
},
},
build: {
minify: true,
outDir: 'dist',
emptyOutDir: false,
target: 'es2015',
rollupOptions: {
input: {
api: resolve(__dirname, 'src', 'api', 'index.ts'),
},
output: {
entryFileNames: `[name].js`,
},
},
},
test: {
name: 'api',
exclude: ['node_modules', 'src/ui/**/*.spec.tsx'],
coverage: {
provider: 'v8',
reportsDirectory: resolve(__dirname, 'coverage', 'api'),
},
},
});