Alec Larson
Alec Larson
Another one https://www.sanity.io/
We can use [`atomically`](https://www.npmjs.com/package/atomically) to safely write to the `.saus/http-cache/metadata.json` file between processes. Then read the metadata on every `.read` call. If we can also track pending requests somehow, avoiding...
This is high priority for Parallel Rendering to be fully operational.
And if a routed renderer *does* define a `head` callback, but it returns a fragment (ie: HTML not wrapped in `` tag), append that fragment into the default renderer's `head`...
Putting this in backlog, as it feels more like the responsibility of the UI framework
This can be implemented with an `onRequest` hook once it supports a route argument. ```ts import { onRequest } from 'saus' onRequest('/admin/*', async req => { return (await verifyAdmin(req)) ?...
We could add a `notAuthorized` helper function: ```ts import { onRequest, notAuthorized } from 'saus' onRequest('/admin/*', async req => { return (await verifyAdmin(req)) ? undefined : notAuthorized(req, '/login') }) ```...
At the very least, we can serialize the Rollup cache, and reuse it in later builds.
v0.4.0+ saves the Rollup cache to `node_modules/.saus` and reuses it in future `saus build` runs. Still todo: Avoid clearing the `build.outDir` on every `saus build` run. Instead, figure out which...
For SSR bundles, we could save a hash of each SSR chunk used to generate a page, and skip rendering if no chunks have changed since last cached.