This repository demonstrates what I think is a bug in SvelteKit around defining endpoints.
I am not exactly sure what the bug is, but the result in my app is that an endpoint named index.json.js
nested anywhere other than the root of the URL structure results in a 404
when it should not.
Four endpoints have been defined:
/index.json
/test.json
/test/index.json
/test/test.json
1, 2 and 4 all work as-expected; they return the following payload
{ "hello": "world" }
3, however, results in a 404
error being triggered by SvelteKit.
I've read over the documentation again and again and can't find anything that would suggest that what is happening in this repository matches the expected or desired behavior.
Clone repository
npm install
npm run dev
Use curl
to hit one of the endpoints, like
curl localhost:3000/test/index.json