Skip to content

Commit

Permalink
Allow sirv to looks for precompiled gzip and brotli files by default (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
istarkov authored Jun 11, 2021
1 parent 1dffefb commit 9a7195b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/heavy-ways-agree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/adapter-node': minor
---

Allow sirv to looks for precompiled gzip and brotli files by default
4 changes: 3 additions & 1 deletion packages/adapter-node/src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ export function createServer({ render }) {
const assets_handler = fs.existsSync(paths.assets)
? sirv(paths.assets, {
maxAge: 31536000,
immutable: true
immutable: true,
gzip: true,
brotli: true
})
: noop_handler;

Expand Down

0 comments on commit 9a7195b

Please sign in to comment.