-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathvite.config.ts
48 lines (42 loc) · 1.28 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
45
46
47
48
import { defineConfig as defineVite} from 'vite'
import tsconfigPaths from 'vite-tsconfig-paths'
import { defineConfig, mergeConfig } from 'vitest/config'
import reactRefresh from '@vitejs/plugin-react-refresh'
import react from "@vitejs/plugin-react-swc";
// https://vitejs.dev/config/
const configVite = defineVite({
plugins: [
react( ),
tsconfigPaths(),
reactRefresh({
// @ts-ignore
excludeExports: ['mapStateToProps', 'mapDispatchToProps']
})
],
esbuild: {
pure: ['console.log'],
},
worker: {
plugins: [react()],
},
base: "/minicurso-web-deploy",
server: {
host: true,
port: 8000, // This is the port which we will use in docker
// Thanks @sergiomoura for the window fix
// add the next lines if you're using windows and hot reload doesn't work
watch: {
usePolling: true
}
}
})
export default mergeConfig(configVite, defineConfig({
test: {
globals: true,
environment: 'jsdom',
setupFiles: 'jest-setup.js',
// you might want to disable it, if you don't have tests that rely on CSS
// since parsing CSS is slow
css: true,
},
}))