Files
release11-tools/Frontend/vite.config.ts
Mikolaj Widla 395ca6817d Implemented REST Mock tool
Co-authored-by: widlam <mikolaj.widla@gmail.com>
Co-authored-by: Adam Bem <adam.bem@zoho.eu>
Reviewed-on: #231
Reviewed-by: Adam Bem <bema@noreply.example.com>
Co-authored-by: Mikolaj Widla <widlam@noreply.example.com>
Co-committed-by: Mikolaj Widla <widlam@noreply.example.com>
2023-06-22 14:11:48 +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)),
}
}
})