Skip to content

Commit

Permalink
make <build> route exclusion rule only exclude static assets
Browse files Browse the repository at this point in the history
  • Loading branch information
Begad666 committed Feb 3, 2025
1 parent 2c6e8dc commit 0f384f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/chilled-timers-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/adapter-cloudflare': patch
---

fix: make `<build>` route exclusion rule only exclude static assets
2 changes: 1 addition & 1 deletion packages/adapter-cloudflare/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function get_routes_json(builder, assets, { include = ['/*'], exclude = ['<all>'
.flatMap((rule) => (rule === '<all>' ? ['<build>', '<files>', '<prerendered>'] : rule))
.flatMap((rule) => {
if (rule === '<build>') {
return `/${builder.getAppPath()}/*`;
return [`/${builder.getAppPath()}/immutable/*`, `/${builder.getAppPath()}/version.json`];
}

if (rule === '<files>') {
Expand Down

0 comments on commit 0f384f2

Please sign in to comment.