When setting a base in the router configuration, on the server-side rendering, router.history.base is an empty string.
It think it's in the abstract constructor that does have the base in argument: https://github.com/vuejs/vue-router/blob/dev/src/history/abstract.js#L10
Well, abstract mode was appearantly designed to not care about "base" at all, because it's ... abstract. It was designed with environments that don't care about actual URLs (like a hybrid cordova app) at all since there's no address bar/browser window.
I understand that you use it in nuxt.js's SSR (?), which is not a browser environment, but renders HTML for such an environment - the user's browser. If that'S the case then offering a solution for this scenario would be indeed a good enhancement.
Question is: should we/an we change abstract mode (without breaking changes) or should we rather introduce a new "SSR" mode?
I think abstract mode should support base, because while it does not care about the address bar, it still can produce urls for links.
Agreed.
Most helpful comment
I think abstract mode should support base, because while it does not care about the address bar, it still can produce urls for links.