vite.config.ts
| 1 | import { defineConfig } from "vite"; |
| 2 | import solid from "vite-plugin-solid"; |
| 3 | |
| 4 | // Vite rather than `bun build`: Solid's JSX is a compile-time transform |
| 5 | // (babel-plugin-jsx-dom-expressions), not the automatic JSX runtime bun |
| 6 | // implements. bun is still the package manager and the runtime — `bun run dev`. |
| 7 | // |
| 8 | // The dev server proxies /api to the Rust binary so cookies stay same-origin. |
| 9 | // Start the backend with `--dev`, which drops the cookie's Secure requirement. |
| 10 | export default defineConfig({ |
| 11 | plugins: [solid()], |
| 12 | server: { |
| 13 | port: 5173, |
| 14 | proxy: { "/api": "http://127.0.0.1:7372" }, |
| 15 | }, |
| 16 | build: { outDir: "dist", emptyOutDir: true }, |
| 17 | }); |
| 18 |