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': {
|
|
|
|
target: 'http://172.16.200.18:8081/',
|
|
|
|
changeOrigin: true,
|
|
|
|
rewrite: (path: string) => path.replace(/^\/front\/ws/, ''),
|
|
|
|
ws: true,
|
|
|
|
},
|
2023-08-08 16:49:49 +08:00
|
|
|
'/front': {
|
2023-07-05 16:12:56 +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': {
|
|
|
|
target: 'http://172.16.200.18:8081/',
|
|
|
|
changeOrigin: true,
|
|
|
|
rewrite: (path: string) => path.replace(/^\/front\/file/, ''),
|
|
|
|
},
|
2024-01-24 13:39:15 +08:00
|
|
|
'/attachment': {
|
|
|
|
target: 'http://172.16.200.18:8081/',
|
|
|
|
changeOrigin: true,
|
|
|
|
rewrite: (path: string) => path.replace(/^\/front\/attachment/, ''),
|
|
|
|
},
|
2024-03-19 11:45:55 +08:00
|
|
|
'/bug/attachment': {
|
|
|
|
target: 'http://172.16.200.18:8081/',
|
|
|
|
changeOrigin: true,
|
|
|
|
rewrite: (path: string) => path.replace(/^\/front\/bug\/attachment/, ''),
|
|
|
|
},
|
2023-12-04 17:40:42 +08:00
|
|
|
'/plugin/image': {
|
|
|
|
target: 'http://172.16.200.18:8081/',
|
|
|
|
changeOrigin: true,
|
|
|
|
rewrite: (path: string) => path.replace(/^\/front\/plugin\/image/, ''),
|
|
|
|
},
|
2023-08-24 16:01:55 +08:00
|
|
|
'/base-display': {
|
|
|
|
target: 'http://172.16.200.18:8081/',
|
|
|
|
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
|
|
|
|
);
|