30 lines
1.3 KiB
TypeScript
30 lines
1.3 KiB
TypeScript
// @lovable.dev/vite-tanstack-config already includes the following — do NOT add them manually
|
|
// or the app will break with duplicate plugins:
|
|
// - tanstackStart, viteReact, tailwindcss, tsConfigPaths, nitro (build-only using cloudflare as a default target),
|
|
// componentTagger (dev-only), VITE_* env injection, @ path alias, React/TanStack dedupe,
|
|
// error logger plugins, and sandbox detection (port/host/strictPort).
|
|
// You can pass additional config via defineConfig({ vite: { ... }, etc... }) if needed.
|
|
import { defineConfig } from "@lovable.dev/vite-tanstack-config";
|
|
|
|
export default defineConfig({
|
|
tanstackStart: {
|
|
server: { entry: "server" },
|
|
},
|
|
// Force a standalone Node server build (.output/server/index.mjs) so the
|
|
// frontend can be deployed on Liara's Node platform. Build-only; dev unaffected.
|
|
nitro: { preset: "node-server" },
|
|
vite: {
|
|
server: {
|
|
port: 5174,
|
|
// allow tunnel hosts (ngrok / cloudflare / localtunnel) to reach the dev server
|
|
allowedHosts: true,
|
|
// single-tunnel sharing: proxy API + websocket to the backend so the
|
|
// frontend can use same-origin relative URLs
|
|
proxy: {
|
|
"/api": { target: "http://localhost:8000", changeOrigin: true },
|
|
"/ws": { target: "http://localhost:8000", ws: true, changeOrigin: true },
|
|
},
|
|
},
|
|
},
|
|
});
|