-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
38 lines (37 loc) · 1002 Bytes
/
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
import { defineConfig, loadEnv } from 'vite'
import react from '@vitejs/plugin-react-swc'
import path from 'path';
// https://vitejs.dev/config/
export default ({ command, mode }: any) => {
console.log(command, 'command');
console.log(mode, 'mode');
console.log(loadEnv(mode, process.cwd()));
return defineConfig({
plugins: [react()],
css: {
preprocessorOptions: {
less: {
modifyVars: {
'@primary-color': '#4377FE',
},
javascriptEnabled: true,
},
},
},
resolve: {
alias: {
'@': path.join(__dirname, './src'),
},
},
server: {
host: '0.0.0.0',
port: 3000,
proxy: {
'/api': {
target: 'http://api-server-api-server-wcvomnbccr.cn-hangzhou.fcapp-test.run',
changeOrigin: true,
},
},
},
});
};