Open synalice opened 2 years ago
@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.
@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?
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.
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: https://github.com/denoland/fresh/issues/461