Files
TurboTrades/frontend/vite.config.js
iDefineHD 53d0c89d17
Some checks failed
Deploy to Production Server / Deploy to 178.63.127.19 (push) Has been cancelled
Clean up tunnel infrastructure and migrate to Gitea
2026-01-10 23:54:31 +00:00

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"],
},
},
},
},
});