vite.config.ts
⎇
Raw
1import { defineConfig } from "vite";
2import 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.
10export 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