fix(vue-app): apply path-to-regexp options to tokensToFunction regexp #6683
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.
Types of changes
Description
Route params should be matched case insensitive, this wasnt the case as the path regexp sensitive option. This was originally fixed in pillarjs/path-to-regexp#191 but vue-router is still on path-to-regexp v1, so I've backported that fix which has now been released in https://github.com/pillarjs/path-to-regexp/releases/tag/v1.8.0
Related vue-router issue: vuejs/vue-router#2925
Note: actually the options arent used at all as we never pass options to compile/tokensToFunction. This actually means the default behaviour changes due to this pr from being case sensitive to case insensitive
Note 2: for a full fix its probably required to wait until a vue-router release has been released that uses path-to-regexp v1.8 or v3. Although in my tests that wasnt actually necessary, not sure exactly if/when vue-router will call tokensToFunction in a Nuxt.js app
Checklist: