Open AlbertSabate opened 4 months ago
I found another issue with nested dynamic routes in Bun 1.1.20-canary.1+ae1948925
:
URL: http://localhost:3000/fdsgsdfg/a
Matched Route:
{
route: MatchedRoute {
filePath: "/Users/aralroca/Documents/repos/error-bug/build/pages/[test]/a/[test2]/lala.js",
kind: "dynamic",
name: "/[test]/a/[test2]/lala",
params: {
test: "fdsgsdfg",
},
pathname: "/fdsgsdfg/a",
query: {
test: "fdsgsdfg",
},
scriptSrc: "[test]/a/[test2]/lala.js",
src: "[test]/a/[test2]/lala.js",
},
I was expecting /[test]/a
instead of /[test]/a/[test2]/lala
.
├── pages
│ ├── [test]
│ │ └── a
│ │ ├── [test2]
│ │ │ └── lala.js
│ │ └── index.js
│ ├── index.js
│ └── page-b.js
I hope it can be prioritized @paperdave @Jarred-Sumner , since FileSystemRouter makes it easy to create frameworks, but they better not be buggy frameworks 🙏
What version of Bun is running?
1.1.17
What platform is your computer?
Darwin 23.5.0 x86_64 i386
What steps can reproduce the bug?
Create a bun project with FileSystemRouter:
Files created (narrowed down):
Create file on process.cwd() - for example
test.js
:What is the expected behavior?
My expectation is the definition of the documentation. https://bun.sh/docs/api/file-system-router
What do you see instead?
Additional information
src/pages/admin/[businessId] Works as expected
src/pages/admin/[businessId]/providers/create Does not work as expected