Files
MyTool/frontend/vite.config.mts
T

32 lines
726 B
TypeScript

import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import { resolve } from 'node:path';
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
// stompjs' package entry also imports its Node.js transport. Use the
// browser-only build so Vite does not emit a bare "websocket" import.
stompjs: resolve(__dirname, 'node_modules/stompjs/lib/stomp.js'),
},
},
define: {
global: 'globalThis',
},
server: {
port: 5173,
proxy: {
'/api': {
target: 'http://localhost:8080',
changeOrigin: true
},
'/ws': {
target: 'http://localhost:8080',
changeOrigin: true,
ws: true
}
}
}
});