Skip to content

Commit

Permalink
Ensure all excluded files in _routes.json start with / (#6952)
Browse files Browse the repository at this point in the history
* Ensure all excluded files in routes.json start with /

* fix changeset
  • Loading branch information
Rich-Harris authored Sep 21, 2022
1 parent fb3d202 commit d0e63d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/orange-rocks-return.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/adapter-cloudflare': patch
---

Ensure all excluded paths in `_routes.json` start with /
3 changes: 2 additions & 1 deletion packages/adapter-cloudflare/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ function get_routes_json(app_dir, assets) {
// We do want to show an example of a _routes.json that
// excludes more than just /_app/immutable/*, and favicons
// are a reasonable choice
.filter((filePath) => filePath.includes('favicon'))
.filter((file) => file.startsWith('favicon'))
.map((file) => `/${file}`)
]
};
}
Expand Down

0 comments on commit d0e63d4

Please sign in to comment.