[🐞] Bug while using rewrite routes pointing to the same file
Which component is affected?
Qwik Runtime
Describe the bug
Hey everyone, do you know how to solve this issue when needing duplicated rewrite routes pointing to the same file? I upgraded my site to > 1.7.2 and can't build it:
More than one route has been found for pathname "..."
I thought this was already solved in [v.1.5.6](https://github.com/QwikDev/qwik/releases/ tag/v1.5.6), in fix(qwikcity): duplicated rewrite routes with multiple prefixes by @shairez in #6377.
Thank you!
Reproduction
https://github.com/fprl/qwik-duplicated-pathname-route
Steps to reproduce
npm run build and you will see the error.
System Info
System:
OS: macOS 14.5
CPU: (8) arm64 Apple M1
Memory: 64.39 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.0.0 - ~/.nvm/versions/node/v22.0.0/bin/node
Yarn: 3.6.3 - /usr/local/bin/yarn
npm: 10.5.1 - ~/.nvm/versions/node/v22.0.0/bin/npm
pnpm: 8.12.1 - /usr/local/bin/pnpm
Browsers:
Chrome: 127.0.6533.120
Safari: 17.5
npmPackages:
@builder.io/qwik: ^1.8.0 => 1.8.0
@builder.io/qwik-city: ^1.8.0 => 1.8.0
typescript: 5.4.5 => 5.4.5
undici: * => 6.19.7
vite: 5.3.5 => 5.3.5
Additional Information
No response
I don't why it different between DEV and PRO.
secondly, paths is an necessary property, I guess
@shairez Please help check this.
is paths in RewriteRouteOption an necessary property?
the only thing left is that when paths is empty, it can run in DEV mode, but PRO can't not.
we have to make DEV and PRO behave consistently
@wmertens CC
@JerryWu1234 any clue on where's the issue? I could try to solve it but if you have a hint it will be easier :)
I haven't really looked at the routing code yet, maybe @shairez knows
Thanks for checking this @JerryWu1234 !
I'll look into solving this after we'll fix the overfetching issue
Thanks for checking this @JerryWu1234 !
I'll look into solving this after we'll fix the overfetching issue
I know the problem where it is.
But there are lot of ways we can fix it,
in my opinion, we can throw an error if didn't pass path
@shairez
looks like this was fixed in #6970 so closing
good job @JerryWu1234 ! 🙏