Skip to content

Commit e907442

Browse files
committed
docs: improve mode change
Close vuejs#266
1 parent fd49bbd commit e907442

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,18 @@ Check the [playground](https://github.com/vuejs/vue-router-next/tree/master/play
1212

1313
### Breaking changes compared to [email protected]
1414

15-
- `mode: 'history'` -> `history: createWebHistory()`
15+
- The `mode: 'history'` option has been replaced with a more flexible one named `history`:
16+
17+
```js
18+
import { createRouter, createWebHistory } from 'vue-router'
19+
// there is also createWebHashHistory and createMemoryHistory
20+
21+
createRouter({
22+
history: createWebHistory(),
23+
routes: [],
24+
})
25+
```
26+
1627
- `base` option is now passed as the first argument to `createWebHistory` (and other histories)
1728
- Catch all routes (`/*`) must now be defined using a parameter with a custom regex: `/:catchAll(.*)`
1829
- `router.match` and `router.resolve` are merged together into `router.resolve` with a slightly different signature

0 commit comments

Comments
 (0)