Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Router base in abtract mode (SSR) #983

Closed
atinux opened this issue Dec 4, 2016 · 3 comments
Closed

Router base in abtract mode (SSR) #983

atinux opened this issue Dec 4, 2016 · 3 comments
Assignees

Comments

@atinux
Copy link
Contributor

atinux commented Dec 4, 2016

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

@LinusBorg
Copy link
Member

LinusBorg commented Dec 7, 2016

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?

@simplesmiler
Copy link
Member

simplesmiler commented Dec 7, 2016

I think abstract mode should support base, because while it does not care about the address bar, it still can produce urls for links.

@LinusBorg
Copy link
Member

Agreed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants