cloudflare / cloudflare/workers-sdk
🐛 BUG: Inconsistent behaviour in `_routes.json`. Also, no way to specify index file.
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 1.5k
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 187
Description
### What version of `Wrangler` are you using?
2.1.12
### What operating system are you using?
Windows
### Describe the Bug
When using a `_routes.json`, the following:
```json
"include": [
"/*"
],
"exclude": [
"/"
]
```
–results in all paths being excluded.
What I expected to happen was `/` (index.html) would be excluded, while everything else was included. I imagine this isn't intentional, as this sounds like what should happen if both include and exclude were set to `/*`, except that Wrangler won't let you do that.
That being said, I cannot find a way to reference a root level index file, as `/` doesn't work.
I tested this both on Wrangler and deployed; the behaviour is the same.
Contributor guide
Assessment
This issue has not been assessed yet.