2023-05-24 11:08:08 +08:00
|
|
|
/// <reference types="vitest" />
|
2023-10-17 10:35:21 +08:00
|
|
|
import baseConfig from './vite.config.base';
|
2023-05-24 11:08:08 +08:00
|
|
|
import { mergeConfig } from 'vite';
|
|
|
|
import eslint from 'vite-plugin-eslint';
|
|
|
|
|
|
|
|
export default mergeConfig(
|
|
|
|
{
|
|
|
|
mode: 'development',
|
|
|
|
server: {
|
|
|
|
open: true,
|
|
|
|
fs: {
|
|
|
|
strict: true,
|
|
|
|
},
|
2023-06-02 15:18:59 +08:00
|
|
|
proxy: {
|
2024-01-31 12:28:51 +08:00
|
|
|
'/ws': {
|
2024-04-09 19:11:25 +08:00
|
|
|
target: 'http://172.16.200.18:8081/',
|
2024-01-31 12:28:51 +08:00
|
|
|
changeOrigin: true,
|
|
|
|
rewrite: (path: string) => path.replace(/^\/front\/ws/, ''),
|
|
|
|
ws: true,
|
|
|
|
},
|
2023-08-08 16:49:49 +08:00
|
|
|
'/front': {
|
2024-04-09 19:11:25 +08:00
|
|
|
target: 'http://172.16.200.18:8081/',
|
2023-06-02 15:18:59 +08:00
|
|
|
changeOrigin: true,
|
2023-08-08 16:49:49 +08:00
|
|
|
rewrite: (path: string) => path.replace(/^\/front/, ''),
|
2023-06-02 15:18:59 +08:00
|
|
|
},
|
2023-10-31 14:46:03 +08:00
|
|
|
'/file': {
|
2024-04-09 19:11:25 +08:00
|
|
|
target: 'http://172.16.200.18:8081/',
|
2023-10-31 14:46:03 +08:00
|
|
|
changeOrigin: true,
|
|
|
|
rewrite: (path: string) => path.replace(/^\/front\/file/, ''),
|
|
|
|
},
|
2024-01-24 13:39:15 +08:00
|
|
|
'/attachment': {
|
2024-04-09 19:11:25 +08:00
|
|
|
target: 'http://172.16.200.18:8081/',
|
2024-01-24 13:39:15 +08:00
|
|
|
changeOrigin: true,
|
|
|
|
rewrite: (path: string) => path.replace(/^\/front\/attachment/, ''),
|
|
|
|
},
|
2024-03-19 11:45:55 +08:00
|
|
|
'/bug/attachment': {
|
2024-04-09 19:11:25 +08:00
|
|
|
target: 'http://172.16.200.18:8081/',
|
2024-03-19 11:45:55 +08:00
|
|
|
changeOrigin: true,
|
|
|
|
rewrite: (path: string) => path.replace(/^\/front\/bug\/attachment/, ''),
|
|
|
|
},
|
2023-12-04 17:40:42 +08:00
|
|
|
'/plugin/image': {
|
2024-04-09 19:11:25 +08:00
|
|
|
target: 'http://172.16.200.18:8081/',
|
2023-12-04 17:40:42 +08:00
|
|
|
changeOrigin: true,
|
|
|
|
rewrite: (path: string) => path.replace(/^\/front\/plugin\/image/, ''),
|
|
|
|
},
|
2023-08-24 16:01:55 +08:00
|
|
|
'/base-display': {
|
2024-04-09 19:11:25 +08:00
|
|
|
target: 'http://172.16.200.18:8081/',
|
2023-08-24 16:01:55 +08:00
|
|
|
changeOrigin: true,
|
|
|
|
rewrite: (path: string) => path.replace(/^\/front\/base-display/, ''),
|
|
|
|
},
|
2023-06-02 15:18:59 +08:00
|
|
|
},
|
2023-05-24 11:08:08 +08:00
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
eslint({
|
|
|
|
cache: false,
|
|
|
|
include: ['src/**/*.ts', 'src/**/*.tsx', 'src/**/*.vue'],
|
|
|
|
exclude: ['node_modules'],
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
},
|
|
|
|
baseConfig
|
|
|
|
);
|