MeterSphere/frontend/config/vite.config.dev.ts

47 lines
1.2 KiB
TypeScript
Raw Normal View History

2023-05-24 11:08:08 +08:00
/// <reference types="vitest" />
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: {
2023-08-08 16:49:49 +08:00
'/front': {
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
},
'/file': {
target: 'http://172.16.200.18:8081/',
changeOrigin: true,
rewrite: (path: string) => path.replace(/^\/front\/file/, ''),
},
'/plugin/image': {
target: 'http://172.16.200.18:8081/',
changeOrigin: true,
rewrite: (path: string) => path.replace(/^\/front\/plugin\/image/, ''),
},
'/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
);