Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nyuchi-docs-mcp-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@cloudflare/vite-plugin": "^1.54.2",
"@cloudflare/workers-types": "^5.20260830.1",
"typescript": "^7.0.2",
"vite": "^7.3.6",
"vite": "^8.2.2",
"vite-plus": "^0.3.0",
"vitest": "^4.1.11",
"wrangler": "^4.127.1"
Expand Down
14 changes: 13 additions & 1 deletion nyuchi-docs-mcp-worker/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,20 @@
import { defineConfig } from "vite-plus";
import { cloudflare } from "@cloudflare/vite-plugin";

// @ts-expect-error TS2321: comparing this config against vite-plus's UserConfig
// exceeds TS's structural-comparison depth. Root cause: cloudflare() returns
// Plugin[] typed against the raw `vite` package, while vite-plus vendors its
// own independently-declared (structurally near-identical, nominally distinct)
// Plugin type via @voidzero-dev/vite-plus-core — comparing two large, deeply
// generic hook interfaces from different packages is exactly what exceeds
// TS's depth limit. Confirmed harmless at runtime: vite-plus's plugin
// pipeline accepts real vite.Plugin objects regardless of which package
// declared the type. Revisit if vite-plus's vendored core types converge with
// vite 8's Plugin shape.
export default defineConfig({
plugins: [cloudflare()],
// Spread, not nest: cloudflare() already returns Plugin[]; nesting it as
// `[cloudflare()]` would produce Plugin[][] on top of the issue above.
plugins: [...cloudflare()],
// Type checking is OPT-IN in Vite+. Without these two lines `vp check` runs
// oxlint only and reports "pass" on `const x: number = "nope"` — verified
// against tsc, which flags TS2322 on that exact line. Adopting the unified
Expand Down
Loading