Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(renderer): Add compressor behavior #749

Merged
merged 1 commit into from Sep 13, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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