create-vite react-ts: npm run build fails with TS6133 / TS1294 / TS1484 while vite dev works
The create-vite react-ts template (create-vite 9.3.4, Vite 8.3.8, TypeScript 7.0.2) builds with 'tsc -b && vite build' and its tsconfig enables noUnusedLocals, noUnusedParameters, erasableSyntaxOnly and verbatimModuleSyntax, so code that runs fine in vite dev can fail npm run build. Errors reproduced: "error TS6133: 'React' is declared but its value is never read.", "error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled." (an enum, a constructor(private x) parameter property, a namespace) and "error TS1484: 'ReactNode' is a type and must be imported using a type-only import..." for import { useState, ReactNode } from 'react'. Fixes that passed: an as const object plus a union type instead of the enum, an explicit field assignment instead of the parameter property, _-prefixed unused parameters, and type on the import; turning those flags off also passes. npx vite build on its own does no type checking, so it succeeds either way. Reproduced on macOS, 2026-11-15.