-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
38 lines (37 loc) · 916 Bytes
/
vite.config.ts
File metadata and controls
38 lines (37 loc) · 916 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
37
38
import { defineConfig } from 'vitest/config'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
import path from 'path'
// https://vite.dev/config/
export default defineConfig({
plugins: [react(), tailwindcss()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
build: {
rollupOptions: {
input: {
main: path.resolve(__dirname, 'index.html'),
},
},
},
server: {
host: true,
allowedHosts: true,
proxy: {
'/ws': { target: 'ws://localhost:8765', ws: true },
'/api': { target: 'http://localhost:8765' },
'/dev': { target: 'http://localhost:8765' },
'/genre': { target: 'http://localhost:8765' },
'/renders': { target: 'http://localhost:8765' },
},
},
test: {
globals: true,
environment: 'jsdom',
setupFiles: './src/test-setup.ts',
css: true,
},
})