mirror of
https://github.com/VibedByKaKi/t3-code-android-nightly.git
synced 2026-10-20 01:07:44 +02:00
Prepare Relay production infrastructure for the PlanetScale PS_20 HA topology, upgrade Effect and Alchemy to compatible betas, reconcile migration state, and preserve patched MCP session termination behavior.\n\nCo-authored-by: codex <codex@users.noreply.github.com>
44 lines
1.3 KiB
TypeScript
44 lines
1.3 KiB
TypeScript
import react from "@vitejs/plugin-react";
|
|
import rsc from "@vitejs/plugin-rsc";
|
|
import { defineConfig } from "vite";
|
|
|
|
// React Router RSC wired directly on @vitejs/plugin-rsc. Alchemy injects the
|
|
// distilled Cloudflare Vite plugin at build/dev time through Cloudflare.Vite.
|
|
export default defineConfig({
|
|
clearScreen: false,
|
|
build: { minify: false },
|
|
plugins: [
|
|
react(),
|
|
rsc({
|
|
serverHandler: false,
|
|
entries: {
|
|
client: "./react-router-vite/entry.browser.tsx",
|
|
ssr: "./react-router-vite/entry.ssr.tsx",
|
|
rsc: "./react-router-vite/entry.worker.tsx",
|
|
},
|
|
}),
|
|
],
|
|
environments: {
|
|
// The Worker is the RSC environment. Alchemy passes this environment
|
|
// topology to the distilled plugin via Cloudflare.Vite.
|
|
rsc: {
|
|
build: {
|
|
rollupOptions: {
|
|
input: { "entry.worker": "./react-router-vite/entry.worker.tsx" },
|
|
},
|
|
},
|
|
},
|
|
// A second `ssr` input the worker loads on demand via
|
|
// loadModule("ssr", "worker-ssr") — alongside the framework's `index`.
|
|
ssr: {
|
|
build: {
|
|
rollupOptions: {
|
|
input: { "worker-ssr": "./react-router-vite/worker-ssr.tsx" },
|
|
},
|
|
},
|
|
},
|
|
},
|
|
optimizeDeps: {
|
|
include: ["react-router", "react-router/internal/react-server-client"],
|
|
},
|
|
});
|