solidjs

prerender-crawler

Framework-agnostic build-time prerendering for fetch-shaped apps, plus Solid's static server functions integration

by solidjs

TypeScript

TypeScript100%

Commit activity

Last 12 weeks · 34 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
87
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template
ryansolid

_Requested by Ryan · project thread_ Before: a server component wrapped in () was saved as an artifact, because the integration encoded the returned render function itself. Client navigation to it crashed in both static and hybrid builds. Hybrid never fell back to the server, since the bad artifact (or a host's 200 fallback page) didn't look like a miss. Page load also refetched every prerendered read the server had already rendered. After: the artifact is exactly what the app's server-function endpoint answers for the call's GET address, status and headers included. Server components, codec values and plain JSON all round-trip. Page load makes no request, and navigation fetches only the artifact. In hybrid mode, a missing artifact falls back to the live server through the app's own transport , even when the host answers with a 200 page. Artifacts are versioned by build, so a CDN never serves the previous deploy's answer. The app's transport is never displaced. How: sends a request through the crawl's own transport, paced like a page, and returns the raw response. The new option reaches integrations as . The Vite plugin mints one per process and defines it as . It is per process rather than per plugin instance because a build can evaluate the config more than once. integration The sink records each call's GET address (, resolved in the app's realm). After the crawl, it replays each address through and stores the response as : a marker line with status and headers, followed by the body bytes. Each captured call therefore runs once more at the end of the build. client returns the runtime's own GET reference and declares its own send: , from solidjs/solid#4170 (released in rc.16). The send maps a prerendered call's GET address to its artifact and rebuilds the Response, and passes everything else to , the app's send. Keys are derived synchronously (a small SHA-256, checked against ), so the lookup reaches in the same tick and hydration adoption keeps working. Breaking (0.x):** New artifact format, extension and directory. The option on is removed. must be . The SSG example moves to rc.16 and router next.41. Verified: Unit tests on rc.16: crawler 62, Solid 39, all passing. The SSG example on rc.16, with nothing wired by hand, in a browser: A direct load of a post or the posts list makes no request beyond the page. Client navigation fetches only artifacts, with no errors. A server-component route app built on solid , checked earlier in this PR: In static mode, the load makes no requests and navigation renders the baked frame. In hybrid mode, navigation falls back to when the artifact is missing. Not covered: the hybrid server still runs functions live during SSR rather than reading the artifacts. _Generated by Claude Code_

ryansolid · 8m ago
eliesgalvira

[Opus-5.5] On behalf of Elies When Solid's start mode uses and the pages are server components, a crawl with the default concurrency writes the wrong page into a file: contains the page. The output is the same on every run. With , or with the default (stream), every file is correct. Versions: prerender-crawler 0.2.0, solid-js and @solidjs/web 2.0.0-rc.13, @solidjs/vite-plugin 3.0.0-next.47, @solidjs/router 2.0.0-next.35, filesystem-routing 0.4.0, vite 8.3.2, Node 24.18, Linux. Minimal reproduction: Steps: run , then look at . Expected: . Actual:** , with the frame id . In my full app, the wrong file also had no `concurrency: 1`.

eliesgalvira · 5h ago
ryansolid

Second half of #8. resolved to 12.0.2, which errors on the flag that pnpm publish forwards to npm. npm 11.19 (bundled with Node 24) has trusted publishing and tolerates the flag. Made with Cursor

ryansolid · 1mo ago
Structured data for AI agents

Repository: solidjs/prerender-crawler. Description: Framework-agnostic build-time prerendering for fetch-shaped apps, plus Solid's static server functions integration Stars: 5, Forks: 0. Primary language: TypeScript. Languages: TypeScript (100%). License: MIT. Topics: prerender, solidjs, ssg, static-site-generation, vite-plugin. Latest release: prerender-crawler@0.3.0 (5m ago). Open PRs: 0, open issues: 0. Last activity: 5m ago. Community health: 87%. Top contributors: ryansolid, claude, github-actions[bot].