Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
flarebot vite.config.ts
703 B · 21 lines
TypeScript
12345678910111213141516171819202122import { octane } from "@octanejs/vite-plugin";import { defaultClientConditions, defineConfig } from "vite";
export default defineConfig(({ isSsrBuild }) => ({ plugins: [octane()], build: { target: "esnext" }, resolve: { dedupe: ["octane"] }, // The Cloudflare adapter builds the server bundle for a webworker target, // which Vite resolves with browser conditions. Packages such as // @tanstack/router-core ship server variants keyed by `workerd`/`worker`, // so list those first for the server build. ...(isSsrBuild ? { ssr: { resolve: { conditions: ["workerd", "worker", ...defaultClientConditions], }, }, } : {}),}));