fix(dev): proxy content registry to CLI server

Inline spark tables (role=spark-table) live in the content registry, but the
rsbuild dev proxy forwarded only /__COMPLETIONS.json and
/__CONTENT_INDEX.json. The registry fetch fell back to the SPA index.html,
so /roll resolved the inline CSV as HTML and csv-parse failed with an
invalid opening quote.

Load the registry before publishing the loaded completions state so a roll
cannot fire while inline content is still unresolvable.
This commit is contained in:
hyper
2026-09-12 20:30:57 +08:00
parent b5591f2a78
commit c7f3b3425b
4 changed files with 7 additions and 3 deletions
+1
View File
@@ -55,6 +55,7 @@ export default defineConfig({
// Proxy content API requests to the CLI dev server (npm run tttk)
"/__CONTENT_INDEX.json": "http://localhost:3000",
"/__COMPLETIONS.json": "http://localhost:3000",
"/__CONTENT_REGISTRY.json": "http://localhost:3000",
"/content": "http://localhost:3000",
"/.ttrpg": "http://localhost:3000",
},