Files
release11-tools/Frontend/vite.config.ts
widlam c0fcd53d35 Added dev server options
Implemented basic structure for mock service
2023-06-16 14:49:56 +02:00

41 lines
1.1 KiB
TypeScript

import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
],
server:{
port: 80,
host: '0.0.0.0',
proxy : {
'/java': {
target:'http://xmltools-backend:8081/',
rewrite: (path) => path.replace(/^\/java/, ''),
},
'/libxml': {
target:'http://xmltools-libxml-backend/',
rewrite: (path) => path.replace(/^\/libxml/, ''),
},
'/mock': {
target:'http://xmltools-mocked-services:8097/',
rewrite: (path) => path.replace(/^\/mock/, ''),
},
'/api/mock': {
target: 'http://xmltools-mocked-services:8097/'
}
},
},
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
'@components': fileURLToPath(new URL('./src/components', import.meta.url)),
'@views': fileURLToPath(new URL('./src/views', import.meta.url)),
'@assets': fileURLToPath(new URL('./src/assets', import.meta.url)),
}
}
})