Skip to content

Commit d0e63d4

Browse files
authored
Ensure all excluded files in _routes.json start with / (#6952)
* Ensure all excluded files in routes.json start with / * fix changeset
1 parent fb3d202 commit d0e63d4

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changeset/orange-rocks-return.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@sveltejs/adapter-cloudflare': patch
3+
---
4+
5+
Ensure all excluded paths in `_routes.json` start with /

packages/adapter-cloudflare/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ function get_routes_json(app_dir, assets) {
8787
// We do want to show an example of a _routes.json that
8888
// excludes more than just /_app/immutable/*, and favicons
8989
// are a reasonable choice
90-
.filter((filePath) => filePath.includes('favicon'))
90+
.filter((file) => file.startsWith('favicon'))
91+
.map((file) => `/${file}`)
9192
]
9293
};
9394
}

0 commit comments

Comments
 (0)