Skip to content

Commit

Permalink
chore: readme updates
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Jun 13, 2024
1 parent f31b049 commit cf7317c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,10 @@ If you don't have an `env.d.ts` file, you can create one and add the unplugin-vu
}
```

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

```diff
-import { createRouter, createWebHistory } from 'vue-router'
+import { createRouter, createWebHistory } from 'vue-router/auto'
import { createRouter, createWebHistory } from 'vue-router'
+import { routes } from 'vue-router/auto-routes'

createRouter({
Expand Down
2 changes: 1 addition & 1 deletion playground/src/pages/users/query.[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const a: RouteRecordName = '/articles'
import type {
RouteLocationNormalized,
RouteLocationNormalized as _RouteLocationNormalized,
} from 'vue-router/auto'
} from 'vue-router'
declare const b: RouteLocationNormalized<'/[name]'>
declare const c: _RouteLocationNormalized<'/[name]'>
Expand Down

0 comments on commit cf7317c

Please sign in to comment.