62 lines
1.2 KiB
JavaScript
62 lines
1.2 KiB
JavaScript
import path from 'path';
|
|
import react from '@vitejs/plugin-react';
|
|
import {defineConfig} from 'vite';
|
|
|
|
export default defineConfig({
|
|
define: {
|
|
global: {}
|
|
},
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src')
|
|
}
|
|
},
|
|
server: {
|
|
proxy: {
|
|
'/mgmt': {
|
|
target: 'http://localhost:38080',
|
|
changeOrigin: true,
|
|
secure: false
|
|
},
|
|
'/api': {
|
|
target: 'http://localhost:38080',
|
|
changeOrigin: true,
|
|
secure: false
|
|
},
|
|
'/actionLogin.do': {
|
|
target: 'http://localhost:38080',
|
|
changeOrigin: true,
|
|
secure: false
|
|
},
|
|
'/actionLogout.do': {
|
|
target: 'http://localhost:38080',
|
|
changeOrigin: true,
|
|
secure: false
|
|
},
|
|
'/img': {
|
|
target: 'http://localhost:38080',
|
|
changeOrigin: true,
|
|
secure: false
|
|
},
|
|
'/servers': {
|
|
target: 'http://localhost:38080',
|
|
changeOrigin: true,
|
|
secure: false
|
|
}
|
|
}
|
|
},
|
|
optimizeDeps: {
|
|
include: ['@monaco-editor/react']
|
|
},
|
|
build: {
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
'monaco-editor': ['monaco-editor/esm/vs/editor/editor.api']
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|