Skip to content

Commit cf7317c

Browse files
committed
chore: readme updates
1 parent f31b049 commit cf7317c

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,10 @@ If you don't have an `env.d.ts` file, you can create one and add the unplugin-vu
154154
}
155155
```
156156

157-
Finally, you should replace your imports from `vue-router` to `vue-router/auto`:
157+
Finally, import the generated routes from `vue-router/auto-routes` and pass them to the router:
158158

159159
```diff
160-
-import { createRouter, createWebHistory } from 'vue-router'
161-
+import { createRouter, createWebHistory } from 'vue-router/auto'
160+
import { createRouter, createWebHistory } from 'vue-router'
162161
+import { routes } from 'vue-router/auto-routes'
163162

164163
createRouter({

playground/src/pages/users/query.[id].vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const a: RouteRecordName = '/articles'
1010
import type {
1111
RouteLocationNormalized,
1212
RouteLocationNormalized as _RouteLocationNormalized,
13-
} from 'vue-router/auto'
13+
} from 'vue-router'
1414
1515
declare const b: RouteLocationNormalized<'/[name]'>
1616
declare const c: _RouteLocationNormalized<'/[name]'>

0 commit comments

Comments
 (0)