@troyio/vite-file-router 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -60,6 +60,21 @@ import { routes } from "virtual:routes";
|
|
|
60
60
|
The virtual module exports a `routes` array with lazy-loaded page and layout
|
|
61
61
|
components.
|
|
62
62
|
|
|
63
|
+
### TypeScript
|
|
64
|
+
|
|
65
|
+
Make sure your application TypeScript project includes Vite's client types and
|
|
66
|
+
the router package's type declarations. For example, add this file as
|
|
67
|
+
`src/vite-env.d.ts`:
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
/// <reference types="vite/client" />
|
|
71
|
+
/// <reference types="@troyio/vite-file-router" />
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
If your `tsconfig.json` sets `compilerOptions.types`, include both
|
|
75
|
+
`"vite/client"` and `"@troyio/vite-file-router"` in that list. Then restart
|
|
76
|
+
the TypeScript server in your editor.
|
|
77
|
+
|
|
63
78
|
## Build
|
|
64
79
|
|
|
65
80
|
```sh
|