From: Eduardo San Martin Morote Date: Fri, 3 Jul 2020 09:36:06 +0000 (+0200) Subject: refactor(router): remove history property X-Git-Tag: v4.0.0-beta.1~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aba3a3f3a0d860f76d75938ae09616a329c7c13c;p=thirdparty%2Fvuejs%2Frouter.git refactor(router): remove history property BREAKING CHANGE: the history property was marked as internal already. Since we need to pass the history instance to the router, we always have access to it, differently from Vue Router 3 where the history was instantiated internally. The history API was also internal (it wasn't documented), so this change shouldn't be a problem as people shouldn't be relying on `router.history` in their apps. If you think this property is needed, please open an issue to discuss the use case. Note it's already accessible as you have to create it: ```js export const history = createWebHistory() export const router = createRouter({ history, routes: [] }) ``` --- diff --git a/src/router.ts b/src/router.ts index 3de6d8d7..b7e1b971 100644 --- a/src/router.ts +++ b/src/router.ts @@ -144,7 +144,7 @@ export interface Router { /** * @internal */ - readonly history: RouterHistory + // readonly history: RouterHistory readonly currentRoute: Ref readonly options: RouterOptions @@ -910,7 +910,6 @@ export function createRouter(options: RouterOptions): Router { onError: errorHandlers.add, isReady, - history: routerHistory, install(app: App) { const router = this app.component('RouterLink', RouterLink)