You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3e24220
Browse filesBrowse the repository at this point in the historyBrowse files
fix(config): stop pointing users at the legacy void.json
Projects configure Void through `void.config.ts`, but several places
still named `void.json`, a file those projects don't have:
- `sourceDir` errors from `readProjectPaths()`, which framework adapters
and many CLI commands use (`readConfig()` already named the right file)
- the error for source conventions that exist in both the project root
and `sourceDir`
- the `[cause]` line printed under every `void.config.ts` validation
error, because `validateConfig()` kept the error from before it
replaced the file name
- `VoidAssetRewriteError`
- `origin` labels in the dev `X-Void-Routing` header and routing lint
warnings, which the rewrites guide already documents as
`void.config.ts#routing.rewrites`
- the file tree on the App Types docs page
The `sourceDir` and conflict errors now name the project's actual config
file, so projects that still use `void.json` keep seeing the right name.
`validateConfig()` no longer attaches the original error as `cause`.
`VoidAssetRewriteError` and the `origin` labels aren't given the file
name, so they always say `void.config.ts`.
`VoidAssetRewriteError` also linked to `void.dev`, which doesn't host
the docs. It now links to `void.cloud`.
Tests: cover the `sourceDir` and conflict errors for both config files,
and what an invalid `void.config.ts` prints. The `void.config.ts` cases
fail on `main`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J8F8mb12HvQFWAKMEqYLme
@@ -142,6 +142,6 @@ export function assertNoRootSourceConventionConflicts(paths: ProjectPaths): void
142
142
return;
143
143
}
144
144
thrownewError(
145
-
`sourceDir: void.json sets "sourceDir": "${paths.sourceDir}", but convention path(s) also exist at the project root: ${conflicts.join(', ')}. Move them under "${paths.sourceDir}" or remove the root copy.`,
145
+
`sourceDir: ${getConfigFileName(paths.root)} sets "sourceDir": "${paths.sourceDir}", but convention path(s) also exist at the project root: ${conflicts.join(', ')}. Move them under "${paths.sourceDir}" or remove the root copy.`,
Copy file name to clipboardExpand all lines: packages/void/src/runtime/handler.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ export class VoidAssetRewriteError extends Error {
22
22
overridename='VoidAssetRewriteError';
23
23
constructor(destination: string){
24
24
super(
25
-
`c.rewrite() cannot re-dispatch to a static asset path (${JSON.stringify(destination)}). Runtime rewrites only reach routes and SSR entries inside the worker — static asset handlers run in front of the worker. To rewrite into an asset, use a static \`routing.rewrites\` rule in void.json or a \`200!\` entry in _redirects. See https://void.dev/guide/edge/rewrites#runtime-rewrites-cannot-reach-static-assets`,
25
+
`c.rewrite() cannot re-dispatch to a static asset path (${JSON.stringify(destination)}). Runtime rewrites only reach routes and SSR entries inside the worker — static asset handlers run in front of the worker. To rewrite into an asset, use a static \`routing.rewrites\` rule in void.config.ts or a \`200!\` entry in _redirects. See https://void.cloud/guide/edge/rewrites#runtime-rewrites-cannot-reach-static-assets`,
0 commit comments