Skip to content

chore(void): remove dead detectSsrPrerender helper - #237

Merged
Brooooooklyn merged 1 commit into
mainfrom
07-01-chore-void-remove-dead-detect-ssr-prerender
Jul 1, 2026
Merged

Brooooooklyn merged 1 commit into
mainfrom
07-01-chore-void-remove-dead-detect-ssr-prerender

Conversation

@shulaoda

@shulaoda shulaoda commented Jul 1, 2026

Copy link
Copy Markdown
Member

What

This removes the detectSsrPrerender function and its two module level regexes PRERENDER_RE and GET_PRERENDER_PATHS_RE from packages/void/src/ssr/entry.ts.

Why

The function is dead code. detectSsrPrerender is never called anywhere in the monorepo, and ssr/entry.ts is not part of the package exports surface, so it is unreachable from outside the package as well. SSR prerender detection is actually performed by pages/scan.ts, which carries its own PRERENDER_RE and GET_PRERENDER_PATHS_RE and uses them during the page scan. The copy in ssr/entry.ts is a superseded duplicate.

Safety

There is no behavior change. The function had no callers, the two regexes were used only by that function, and the rest of ssr/entry.ts, including getSsrServerEntryPath and validateSsrEntries, is untouched. The readFileSync import stays because it is still used elsewhere in the file.

Verification

There are zero references to detectSsrPrerender across packages including tests. The void package typechecks cleanly with tsgo. The net change removes 27 lines.

This removes the detectSsrPrerender function and its two module level regexes PRERENDER_RE and GET_PRERENDER_PATHS_RE from packages/void/src/ssr/entry.ts.

The function is dead code. detectSsrPrerender is never called anywhere in the monorepo, and ssr/entry.ts is not part of the package exports surface, so it is unreachable from outside the package as well. SSR prerender detection is actually performed by pages/scan.ts, which carries its own PRERENDER_RE and GET_PRERENDER_PATHS_RE and uses them during the page scan. The copy in ssr/entry.ts is a superseded duplicate.

There is no behavior change. The function had no callers, the two regexes were used only by that function, and the rest of ssr/entry.ts, including getSsrServerEntryPath and validateSsrEntries, is untouched. The readFileSync import stays because it is still used elsewhere in the file.

There are zero references to detectSsrPrerender across packages including tests. The void package typechecks cleanly with tsgo. The net change removes 27 lines.
@Brooooooklyn
Brooooooklyn merged commit 211f904 into main Jul 1, 2026
6 checks passed
@Brooooooklyn
Brooooooklyn deleted the 07-01-chore-void-remove-dead-detect-ssr-prerender branch July 1, 2026 07:34
cpojer pushed a commit that referenced this pull request Sep 11, 2026
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants