-
Notifications
You must be signed in to change notification settings - Fork 666
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
Behavior of /[dynamic].ext
routes together with /static.ext
#475
Comments
@synalice I think it uses the static routes first over the dynamic ones (priority wise). It works fine creating a new project and adding static routes on the relative path to dynamic ones Recording example: https://user-images.githubusercontent.com/47249618/177854292-b182fb60-6600-4e48-a962-7afbdf2a79cc.mp4 |
@iamsahilsonawane, yes, I know it does choose static over the dynamic and works fine. What I'm saying is that most of the time it wouldn't be a wise decision to put dynamic routes together with static, and the developer should be warned about what's he doing. |
Yes, I see, I think there should be lints implemented for this |
I would be interested in helping with this (and getting involved generally) @lucacasonato - you tagged good-first-issue Would you (or anyone) be able to give any pointers as to where and how you would like the warning to be shown? I'm currently thinking it would show in the terminal output where the developer has started the process? |
IMO yes, there should be a warning in the terminal. Also, these warnings should be reflected in the docs. |
Ok sure I can have a go a figuring this out. |
Proposing a feature of an error (or a warning) being returned to the developer when trying to create a single
/[dynamic].ext
route in the same folder with/static.ext
routes, or when creating multiple/[dynamic].ext
routes in the same folder. Doing this may lead to an unexpected behavior and thus should be discouraged.It should be obvious which file will be returned instead of Fresh choosing one over the other.
Related issue: #461
The text was updated successfully, but these errors were encountered: