Skip to content

Commit 9a7195b

Browse files
authored
Allow sirv to looks for precompiled gzip and brotli files by default (#1672)
1 parent 1dffefb commit 9a7195b

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.changeset/heavy-ways-agree.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@sveltejs/adapter-node': minor
3+
---
4+
5+
Allow sirv to looks for precompiled gzip and brotli files by default

packages/adapter-node/src/server.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ export function createServer({ render }) {
3030
const assets_handler = fs.existsSync(paths.assets)
3131
? sirv(paths.assets, {
3232
maxAge: 31536000,
33-
immutable: true
33+
immutable: true,
34+
gzip: true,
35+
brotli: true
3436
})
3537
: noop_handler;
3638

0 commit comments

Comments
 (0)