]> git.ipfire.org Git - thirdparty/vuejs/router.git/commit
refactor(router): remove history property
authorEduardo San Martin Morote <posva13@gmail.com>
Fri, 3 Jul 2020 09:36:06 +0000 (11:36 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Fri, 3 Jul 2020 09:36:06 +0000 (11:36 +0200)
commitaba3a3f3a0d860f76d75938ae09616a329c7c13c
treec9567f27ff7e9813418c7fcf103b99c95120697a
parent10a071c85c62b6674929162aa36220bd8c167f27
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: [] })
```
src/router.ts