Closed LeeSamFong closed 5 months ago
Itβs a convention, similar to example.com becoming example.com/.
But if I don't set the base, http://localhost:5173
will not be appended with /
, and it will be automatically removed when '/' is included. Behaving inconsistently.
So is this a bug?
it's not a bug, the browser hides the slash but if you check location
, it's there
Reproduction
https://github.com/LeeSamFong/vue-router-demo
Steps to reproduce the bug
Observe that the browser address bar changes to: http://localhost:5173/dist/aaa/ There is an extra
/
at the end/dist/aaa
->/dist/aaa/
Expected behavior
When base is not the default value,
/
is not automatically added when accessing the home page.Actual behavior
When my base is not the default value, after accessing the root route
/dist/aaa
,/
will be automatically added at the end, becoming ->/dist/aaa/
Additional information
No response