Skip to content

Commit

Permalink
non-hashed static assets should not be cached
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Jan 3, 2022
1 parent 341a5de commit ccaba82
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 ccaba82

Please sign in to comment.