Download tasks/hipcamp/solution/site/implementation/clone/vite.config.ts from TIGER-Lab/WebsiteBench: direct link, hf CLI and curl.
- Browser
- Download file 1.21 kB
-
https://huggingface.co/datasets/TIGER-Lab/WebsiteBench/resolve/main/tasks/hipcamp/solution/site/implementation/clone/vite.config.ts
- Command line
-
hf download hf://datasets/TIGER-Lab/WebsiteBench/tasks/hipcamp/solution/site/implementation/clone/vite.config.ts
-
curl -L -o vite.config.ts https://huggingface.co/datasets/TIGER-Lab/WebsiteBench/resolve/main/tasks/hipcamp/solution/site/implementation/clone/vite.config.ts
1.21 kB
| import vinext from "vinext"; | |
| import { defineConfig } from "vite"; | |
| const hostingConfig = {"d1":"DB","r2":null}; | |
| import { sites } from "./build/sites-vite-plugin"; | |
| const placeholderDatabaseId = "00000000-0000-4000-8000-000000000000"; | |
| const isCodexSeatbeltSandbox = process.env.CODEX_SANDBOX === "seatbelt"; | |
| const { d1 } = hostingConfig; | |
| const localBindingConfig = { | |
| main: "./worker/index.ts", | |
| compatibility_flags: ["nodejs_compat"], | |
| d1_databases: d1 | |
| ? [ | |
| { | |
| binding: d1, | |
| database_name: "hipcamp-local", | |
| database_id: placeholderDatabaseId, | |
| }, | |
| ] | |
| : [], | |
| }; | |
| export default defineConfig(async () => { | |
| process.env.WRANGLER_WRITE_LOGS ??= "false"; | |
| process.env.WRANGLER_LOG_PATH ??= ".wrangler/logs"; | |
| process.env.MINIFLARE_REGISTRY_PATH ??= ".wrangler/registry"; | |
| const { cloudflare } = await import("@cloudflare/vite-plugin"); | |
| return { | |
| server: isCodexSeatbeltSandbox | |
| ? { watch: { useFsEvents: false, usePolling: true } } | |
| : undefined, | |
| plugins: [ | |
| vinext(), | |
| sites(), | |
| cloudflare({ | |
| viteEnvironment: { name: "rsc", childEnvironments: ["ssr"] }, | |
| config: localBindingConfig, | |
| }), | |
| ], | |
| }; | |
| }); | |