Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I'd suggest to only mention the
routeRules
here as it is a vendor-independent way for designing redirects which will work even when changing the deploy preset.Any thoughts @pi0 @danielroe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case,
routeRules
will need a more descriptive documentation. I triedrouteRules
, but it did not solve the issue I had. I had to use_redirects
. Just bringing my thoughts πThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be more precise: in my project, I have a completely separated SPA that lives in the
public/admin
directory. As with other SPAs, I have to make a redirect rule that work like this:I tried using
routeRules
for this, but did not succeed. I therefore ended up with the_redirects
file as a working solution, but it wasn't clear for me where to put file before I checked the actual source code of Nitro.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure this can be achieved using route rules too. We can keep this as last resort (however consider the file might be overridden!)
Do you mind making a PR @manniL to recommend routeRules?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will doβΊοΈ