-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(remix-dev/flat-routes): use index
without leading underscore for colocation
#5160
Conversation
…ndex` without leading underscore for route Signed-off-by: Logan McAnsh <logan@mcan.sh>
🦋 Changeset detectedLatest commit: 06f5e47 The changes in this PR will be included in the next version bump. This PR includes changesets to release 18 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Signed-off-by: Logan McAnsh <logan@mcan.sh>
Co-authored-by: Pedro Cattori <pcattori@gmail.com>
🤖 Hello there, We just published version Thanks! |
Hi 👋 and thanks for the fix 👍 I somehow find it irritating that Similarly when using dot routes Is there a reasoning behind that? |
I believe it‘s a bug. Or at least the ideas and conventions of colocation explained in the RFC/Docs and the implementation do not match yet. See my comment (and the RFC) here: #4482 (comment) A correct implementation (as far as I was able to test it) can be added via @kiliman library https://github.com/kiliman/remix-flat-routes As @ryanflorence is saying in his gist :
|
@lennerd If there are still bugs, do you mind opening a new issue? It'll be much easier to get it prioritized that way. |
@Xiphe and @lennerd There's a difference between v2 routing and my package. With v2 routing, it only supports flat-files flat-folders |
He, was about to post a reference to your comment here: #5216 (comment) and that I seem to have understood things wrong. The irritating thing for me was that both routes and folders use "index" but they don't mean the same thing. So the flat-folder equivalent of Thanks for clarifying! |
Yeah, it is a little confusing, but there is a difference in meaning. That's why v2 routing makes it explicit which type you mean: index route vs colocated index route file. It's simpler to teach it that way.
Yes that is correct. |
If you want an index route, you use
I'm expecting this is only confusing temporarily for people coming from the old convention, or people who aren't familiar with node module "index" resolution. Again, only |
Awesome! I like how it's written in that section. Thanks for clarifying! |
before:
after:
Signed-off-by: Logan McAnsh logan@mcan.sh
Closes: #
Testing Strategy: