Whenever I try to use a simple
<router-link to="https://google.com">
Google
</router-link>
it renders the link to http://localhost:8080/https:/google.com
router.js
export default new Router({
mode: 'history',
base: process.env.BASE_URL,
)}
and I have no .env
file. Whenever I create the .env
and add BASE_URL=http://localhost:8080
it renders http://localhost:8080/http:/localhost:8080/https:/google.com
Have anyone experienced this issue?
UPDATE The example above reflects external websites but this is also happening with internal links. Example:
<router-link avatar :to="{name: 'author', params: {id: author.id, name: author.name}}"> foo </router-link>
definition author's route
{
path: '/author/:id/:name',
name: 'author',
component: Author
},
Everything was working okay some days ago but there must be something I added that changed this behaviour. I have looked everywhere but can't seem to find where all went wrong.