Skip to content

Commit

Permalink
docs: improve publicAssets config details (#1102)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielcipriano authored Apr 10, 2023
1 parent db1dcfc commit b0550c2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/content/3.config.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,22 @@ Public asset directories to serve in development and bundle in production.

If a `public/` directory is detected, it will be added by default, but you can add more by yourself too!

It's possible to set Cache-Control headers for assets using the `maxAge` option:
```
publicAssets: [
{
baseURL: "images",
dir: "public/images",
maxAge: 60 * 60 * 24 * 7, // 7 days
},
],
```
The config above generates the following header in the assets under `public/images/` folder:

`cache-control: public, max-age=604800, immutable`



### `compressPublicAssets`

- Default: `{ gzip: false, brotli: false }`{lang=ts}
Expand Down

0 comments on commit b0550c2

Please sign in to comment.