fix: do not push baseURL with the vue router#171
fix: do not push baseURL with the vue router#171Baroshem merged 1 commit intonuxt-modules:chore/2.0.0-rc.1from Lehoczky:fix/do-not-push-baseurl-twice-when-navigating
baseURL with the vue router#171Conversation
|
Hey! First of all, thanks for the PR! I have a small concern that I wanted to talk to you about. This code you wrote certainly solves your issue you mentioned in a linked bug but I am not sure if it should be applied globally like this. In your particular example, it resolves to a duplicated params in url, while I can think of examples where this wouldnt be a case. For example, lets say that in your case, user would set baseUrl in nuxt.config.ts to something like Taking into consideration this example, it could break that users code. Because DocSearch would point to frontend-tools/somethin-else without the v2 prefix because it would be removed by your code. Maybe there is an another way where this functionality could be delivered to you without potentially causing issues to other cases? :) |
|
Heey, If the user changes the Is this the scenario you were thinking of? |
|
I would also consider this as a bugfix, because now the links in the search results point to a different URL then they actually navigate to: if an anchor link has If someone needs some additional logic for handling the routes, they can do so with I'm trying to think of an edge cases here, where we might removing some part of the URL when we shouldn't, but the code really just eliminates the |
|
Changing the branch here from main to chore/2.0.0-rc.1 |
Types of changes
Description
Fixes #166
For demo purposes I've implemented this change in my project and deployed the site here, so you can try it out with actual docsearch results.
Checklist: