-
Notifications
You must be signed in to change notification settings - Fork 2
/
vite.config.ts
33 lines (32 loc) · 1.03 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
import {defineConfig} from 'vite'
import path from 'path'
import react from '@vitejs/plugin-react'
import istanbul from 'vite-plugin-istanbul' // cy code cov
import EnvironmentPlugin from 'vite-plugin-environment' // to be able to use process.env.
export default defineConfig({
server: {port: 3000},
build: {
sourcemap: true,
},
plugins: [
react(),
istanbul({
cypress: true,
requireEnv: false,
}),
EnvironmentPlugin(['VITE_API_URL']),
],
resolve: {
alias: {
components: path.resolve(__dirname, 'src', 'components'),
villains: path.resolve(__dirname, 'src', 'villains'),
boys: path.resolve(__dirname, 'src', 'boys'),
heroes: path.resolve(__dirname, 'src', 'heroes'),
hooks: path.resolve(__dirname, 'src', 'hooks'),
models: path.resolve(__dirname, 'src', 'models'),
'@support': path.resolve(__dirname, 'cypress', 'support'),
'@fixtures': path.resolve(__dirname, 'cypress', 'fixtures'),
'@cypress': path.resolve(__dirname, 'cypress'),
},
},
})