Skip to content

Commit

Permalink
non-hashed static assets should not be cached (#3193)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris authored Jan 3, 2022
1 parent 341a5de commit 7c10a08
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/fast-pans-enjoy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/adapter-node': patch
---

Don't cache non-hashed static assets in adapter-node
2 changes: 1 addition & 1 deletion packages/adapter-node/src/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function sequence(handlers) {
export const handler = sequence(
[
serve(path.join(__dirname, '/client'), 31536000),
serve(path.join(__dirname, '/static'), 31536000),
serve(path.join(__dirname, '/static'), 0),
serve(path.join(__dirname, '/prerendered'), 0),
ssr
].filter(Boolean)
Expand Down

0 comments on commit 7c10a08

Please sign in to comment.