Skip to content

Commit

Permalink
docs: add example to disable serve placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
atinux authored Jan 30, 2021
1 parent 2cbd3b6 commit 2267c44
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion content/en/guides/configuration-glossary/configuration-render.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,30 @@ To disable compression, use `compressor: false`.

- Type `Object`
- Default: `{ dist: {}, static: { skipUnknown: true } }`
- `dist` key is for routes matching the [publicPath](/docs/2.x/configuration-glossary/configuration-build#publicpath) (ie: `/_nuxt/*`)
- `static` key is for routes matching routes matching `/*`

> Options for [serve-placeholder](https://github.com/nuxt/serve-placeholder) middleware.
> `dist` and `static` values are forwarded to [serve-placeholder](https://github.com/nuxt-contrib/serve-placeholder) middleware.
If you want to disable one of them or both, you can pass a falsy value.

Example of allowing `.js` extension for routing (ex: `/repos/nuxt.js`):

```js [nuxt.config.js]
export default {
render: {
fallback: {
static: {
// Avoid sending 404 for these extensions
handlers: {
'.js': false
}
}
}
}
}
```

## http2

- Type `Object`
Expand Down

0 comments on commit 2267c44

Please sign in to comment.