-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
38 lines (37 loc) · 948 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 } from 'vite';
import vue from '@vitejs/plugin-vue';
import VueDevTools from 'vite-plugin-vue-devtools';
import tailwind from 'tailwindcss';
import path from 'path';
import autoprefixer from 'autoprefixer';
// https://vitejs.dev/config/
export default defineConfig({
css: {
postcss: {
plugins: [tailwind(), autoprefixer()],
},
},
plugins: [vue(), VueDevTools()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
server: {
proxy: {
'/qwep/api/v1': {
target: 'https://test.qrq.ru',
changeOrigin: true,
secure: false,
ws: true,
rewrite: (path) => path.replace(/^\/qwep\/api\/v1/, '/qwep/api/v1'),
},
'/core/api/v1': {
target: 'https://test.qrq.ru',
changeOrigin: true,
secure: false,
rewrite: (path) => path.replace(/^\/core\/api\/v1/, '/core/api/v1'),
},
},
},
});