Problem
webjs reads a webjs.* object from package.json (elide today, and the surface will grow with headers/redirects/basePath/trailingSlash). There is no type, JSON schema, or validation, so a typo'd key is silently dropped and the feature it was meant to toggle stays at default with no diagnostic. This is the config equivalent of an untyped API and fails open.
Design / approach
Ship a standard JSON Schema ($schema) for the webjs.* block (and/or a small exported type) so editors validate it natively; optionally a webjs check warning on unknown keys. Schema is a static file, no code.
Web-standards fit: A standard JSON Schema the editor consumes natively; adds a static file, not validation code.
Prior art: Next.js NextConfig type; Astro/Vite defineConfig rejecting unknown keys.
Acceptance criteria
Filed from the production-readiness audit (webjs vs Next.js / Remix / Rails / Turbo / Lit). Theme: types. Priority: P2. Kept to webjs identity: no-build, progressive enhancement, web-components-first, AI-first, batteries-included, close to web standards.
Problem
webjs reads a webjs.* object from package.json (elide today, and the surface will grow with headers/redirects/basePath/trailingSlash). There is no type, JSON schema, or validation, so a typo'd key is silently dropped and the feature it was meant to toggle stays at default with no diagnostic. This is the config equivalent of an untyped API and fails open.
Design / approach
Ship a standard JSON Schema ($schema) for the webjs.* block (and/or a small exported type) so editors validate it natively; optionally a webjs check warning on unknown keys. Schema is a static file, no code.
Web-standards fit: A standard JSON Schema the editor consumes natively; adds a static file, not validation code.
Prior art: Next.js NextConfig type; Astro/Vite defineConfig rejecting unknown keys.
Acceptance criteria
Filed from the production-readiness audit (webjs vs Next.js / Remix / Rails / Turbo / Lit). Theme: types. Priority: P2. Kept to webjs identity: no-build, progressive enhancement, web-components-first, AI-first, batteries-included, close to web standards.