Skip to content

Commit

Permalink
docs(renderer): Add compressor behavior (#749)
Browse files Browse the repository at this point in the history
  • Loading branch information
manniL authored and Atinux committed Sep 13, 2018
1 parent f2b6e15 commit 46cfdb2
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions en/api/configuration-render.md
Expand Up @@ -37,11 +37,15 @@ To disable etag for pages set `etag: false`

See [etag](https://www.npmjs.com/package/etag) docs for possible options.

### gzip
### compressor
- Type `Object`
- Default: `{ threshold: 0 }`

See [compression](https://www.npmjs.com/package/compression) docs for possible options.
When providing an object (or a falsy value), the [compression](https://www.npmjs.com/package/compression) middleware
will be used (with respective options).

If you want to use your own compression middleware, you can reference it
directly (f.ex. `otherComp({ myOptions: 'example' })`).

### http2
- Type `Object`
Expand All @@ -55,15 +59,15 @@ Activate HTTP2 push headers.

> Adds `prefetch` and `preload` links for faster initial page load time.
You may want to only disable this option if have many pages and routes.
You may want to only disable this option if have many pages and routes.

## ssr
- Type: `boolean`
- Default: `true` on universal mode and `false` on spa mode

> Enable SSR rendering
This option is automatically set based on `mode` value if not provided.
This option is automatically set based on `mode` value if not provided.
This can be useful to dynamically enable/disable SSR on runtime after image builds. (With docker for example)

## static
Expand Down

0 comments on commit 46cfdb2

Please sign in to comment.