Some checks failed
Deploy to Production Server / Deploy to 178.63.127.19 (push) Has been cancelled
47 lines
1022 B
JavaScript
47 lines
1022 B
JavaScript
import { defineConfig } from "vite";
|
|
import vue from "@vitejs/plugin-vue";
|
|
import path from "path";
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
host: true, // Listen on all addresses
|
|
allowedHosts: [
|
|
".trycloudflare.com", // Cloudflare Quick Tunnels
|
|
".turbo.local", // Custom tunnel domains
|
|
".devtunnels.ms", // VS Code Dev Tunnels
|
|
"localhost",
|
|
],
|
|
proxy: {
|
|
"/api": {
|
|
target: "http://localhost:3000",
|
|
changeOrigin: true,
|
|
// Don't rewrite - backend expects /api prefix
|
|
},
|
|
"/ws": {
|
|
target: "http://localhost:3000",
|
|
ws: true,
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
build: {
|
|
outDir: "dist",
|
|
sourcemap: false,
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
"vue-vendor": ["vue", "vue-router", "pinia"],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
});
|