docs: add mistake #19 — optional TypeScript params break vite build SSR
Documents the param?: Type pattern that esbuild mishandles in .svelte files (strips the type but leaves ?, producing invalid JavaScript). Adds the full write-up to REFERENCE__Common_Agent_Mistakes.md and a summary entry #10 to BOOTSTRAP__AI_Agent_Quickstart.md §7. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -308,6 +308,9 @@ Read this section first, then open the reference doc when your task touches one
|
||||
field, SWR-await-after-write races, and stateful/conditional sync gates that desync local
|
||||
state from history rather than current config. See the Pres Mgmt Config sync overhaul
|
||||
(2026-06-16) in `PROJECT__AE_Events_PressMgmt_Config_Cleanup.md` for the full incident.
|
||||
10. **`param?: Type` in `.svelte` function/snippet parameters** — breaks `vite build` (SSR step)
|
||||
silently: dev server is fine, Docker/production builds fail with "Expected ',', got '?'".
|
||||
Use `param: Type | undefined = undefined` instead. See mistake #19 in the reference doc.
|
||||
|
||||
The reference doc also includes a short archive list for older, less-relevant historical incidents.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user