Skip to content

Commit 76f9392

Browse files
committed
docs: add instructions about moduleResolution: Bundler
See #323
1 parent 80a2251 commit 76f9392

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ For people using the file-based routing, you now need to add `unplugin-vue-route
149149
- Data Loaders now return an `isLoading` property instead
150150
of `pending`. This aligns better with the wording of Data Loaders being
151151
in a loading state rather than pending, which can have more meanings.
152-
- You know need to add `unplugin-vue-router/client` to the `types` property of your tsconfig. See [setup](https://uvr.esm.is/introduction.html#setup) for an example.
152+
- You know need to add `unplugin-vue-router/client` to the `types` property of your tsconfig. See [setup](https://uvr.esm.is/introduction.html#setup) for an example. This file contains the augmentation of the `vue-router/auto` module that was previously in `typed-router.d.ts`. You also need to set the `modeResolution` to `Bundler` in your `tsconfig.json`.
153153

154154
- the existing `defineLoader` is being replaced by a
155155
basic loader without cache. The version with cache will be implemented

docs/introduction.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,21 +76,25 @@ build({
7676

7777
## Setup
7878

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`. 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 `unplugin-vue-router/client` to `types` and `"moduleResolution": "Bundler"`. This is what it should look like:
8080

8181
::: code-group
8282

83-
```json{4,8} [tsconfig.json]
83+
```json{4,8,11} [tsconfig.json]
8484
{
8585
"include": [
8686
// other files...
8787
"./typed-router.d.ts"
8888
],
89-
"types": [
90-
// other types...
91-
"unplugin-vue-router/client"
92-
]
93-
// other options...
89+
"compilerOptions": {
90+
// ...
91+
"moduleResolution": "Bundler",
92+
"types": [
93+
// other types...
94+
"unplugin-vue-router/client"
95+
]
96+
// other options...
97+
}
9498
}
9599
```
96100

0 commit comments

Comments
 (0)