-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathvite.config.ts
More file actions
32 lines (29 loc) · 717 Bytes
/
Copy pathvite.config.ts
File metadata and controls
32 lines (29 loc) · 717 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
import path from 'node:path';
import { readFileSync } from 'node:fs';
import tailwindcss from '@tailwindcss/vite';
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vite';
const pkg = JSON.parse(
readFileSync(path.resolve(__dirname, './package.json'), 'utf-8'),
) as { version: string };
export default defineConfig({
plugins: [react(), tailwindcss()],
clearScreen: false,
define: {
__APP_VERSION__: JSON.stringify(pkg.version),
},
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
server: {
host: '127.0.0.1',
port: 14238,
strictPort: true,
},
test: {
environment: 'jsdom',
setupFiles: './src/test/setup.ts',
},
});