42 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			42 lines
		
	
	
		
			1.2 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)),
 | 
						|
      '@man': fileURLToPath(new URL('./src/components/man', import.meta.url)),
 | 
						|
    }
 | 
						|
  }
 | 
						|
})
 |