Commit Graph
19 Commits
Author SHA1 Message Date
Leo Kettmeir 2ec980ca45 fix: PageProps.params never contains arrays, only strings (#91) 2022-02-15 13:24:18 +01:00
Leo Kettmeir d334b53320 feat: support custom error pages (#86) 2022-02-15 01:17:47 +01:00
Leo Kettmeir 64fbcabf67 chore: add a default type for render data (#90) 2022-02-14 16:30:54 +01:00
Leo KettmeirandLuca Casonato 788a85c431 feat: allow passing additional args to HandlerContext.render (#82)
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
2022-02-11 01:25:47 +01:00
quenio-lt c436705b96 fix: log error message if <Head> rendering fails (#75) 2021-12-01 12:19:18 +01:00
Luca Casonato 44a0d490fe feat: add support for CSP (#72)
This commit adds support for running with CSP. CSP can be enabled
on a per page basis. If this is done, fresh will set a default CSP that
is very restrictive. Users can modify the CSP with the `useCSP` hook.
Fresh will add its own script resources to the CSP automatically.
2021-11-01 12:58:13 +01:00
Luca Casonato f343e8bac7 feat: add support for <Head> component (#67)
This component only works during SSR, during the inital render. It does
not work on renders inside a suspense boundary, or client renders.
2021-10-04 11:35:01 +02:00
Luca Casonato 7cf4ca07ed feat: streaming rendering with suspense (#59)
This commit introduces support for streaming server side rendering using
<Suspense>.
2021-09-26 01:21:02 +02:00
Luca Casonato a25ec7109c feat: support overriding page routes (#57) 2021-09-25 11:27:16 +02:00
Luca Casonato 0fbc9e816a BREAKING: disable runtime JS by default (#55) 2021-09-25 11:05:49 +02:00
Luca Casonato aeaddb1eaa chore: use esm.sh + optionally use native esbuild (#52)
`preact` and `preact-render-to-string` are now imported from esm.sh.

Additionally, the native binary build of esbuild will now be used in
deno cli to speed up bundle times.
2021-09-25 02:28:43 +02:00
Luca Casonato a929b1022a switch back to x.lcas.dev (#49) 2021-09-01 13:16:03 +02:00
Luca Casonato 0777c1c7ba feat: add context information to render function (#46) 2021-08-06 18:08:48 +02:00
Luca Casonato 8d2935aef3 chore: update deps (#42)
This commit updates dependencies. Preact is now pulled from esm.sh.
2021-07-20 12:52:25 +02:00
Luca Casonato 65d164d073 feat: add config option to disable runtime js (#36)
The config option can be toggled per page:

```js
export const config: PageConfig = { runtimeJS: false };
```
2021-06-13 00:01:59 +02:00
Luca Casonato 18feea9c45 feat: elide __FRSH_PROPS for no data or params (#33)
Minor size improvement.
2021-06-12 00:23:59 +02:00
Luca Casonato 56baffa96d feat: support suspending during SSR and useData (#27)
This commit adds support for suspending during JIT SSR rendering.
Additionally this PR adds `useData` support. This hook is triggered
during JIT render and can be used to fetch data. This data is sent to
the client and returned there from calls to useData too.
2021-06-11 13:59:55 +02:00
Luca Casonato 771643d1c4 update example 2021-05-08 18:47:54 +02:00
Luca Casonato 6ecdf2ed73 init 2021-05-08 02:07:24 +02:00