You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/introduction.md
+32-8Lines changed: 32 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -76,24 +76,20 @@ build({
76
76
77
77
## Setup
78
78
79
-
After adding this plugin, **start the dev server** (usually `npm run dev`) **to generate the first version of the types** at `typed-router.d.ts` which should be added to your `tsconfig.json` along with `unplugin-vue-router/client` to `types` and `"moduleResolution": "Bundler"`. This is what it should look like:
79
+
After adding this plugin, **start the dev server** (usually `npm run dev`) **to generate the first version of the types** at `typed-router.d.ts` which should be added to your `tsconfig.json` along with `"moduleResolution": "Bundler"`. This is what it should look like:
If you don't have an `env.d.ts` file, you can create one and add the unplugin-vue-router types to it _or_ you can add them to the `types` property in your `tsconfig.json`:
139
+
140
+
::: code-group
141
+
142
+
```json [tsconfig.json]
143
+
{
144
+
"compilerOptions": {
145
+
// ...
146
+
"types": [
147
+
"unplugin-vue-router/client"// [!code ++]
148
+
]
149
+
}
150
+
}
151
+
```
152
+
153
+
:::
154
+
131
155
Instead of importing from `vue-router`, you should import from `vue-router/auto`.
0 commit comments