Hey! I'm having an issue with experimental: { typedPages: true } in a Bun monorepo setup.
Problem:
useRoute() should be typed as:
```ts
function useRoute<Name extends keyof RouteNamedMap>(_name?: Name): RouteLocationNormalizedLoaded<Name>
But instead I get:
```ts
function _useRoute<Name extends string | symbol>(_name?: Name): RouteLocationNormalizedLoadedGeneric
```
So route.params.itemShortId is untyped.
Setup:
Nuxt 4.3.0
Bun 1.3.6 (monorepo with workspaces)
experimental: { typedPages: true } enabled
.nuxt/types/typed-router.d.ts is correctly generated with RouteNamedMap
Root cause (I think):
In .nuxt/tsconfig.json, Nuxt generates this path mapping:
"vue-router/auto-routes": [
"../../../node_modules/.bun/[email protected]+.../vue-router/vue-router-auto-routes"
]
This points to vue-router's stub file (vue-router-auto-routes.d.ts) which only exports routes: any[].
The module augmentation chain seems broken:
typed-router.d.ts augments 'vue-router/auto-routes' with RouteNamedMap ✅
unplugin-vue-router/client.d.ts imports RouteNamedMap from 'vue-router/auto-routes' to augment vue-router's TypesConfig ❌ (doesn't resolve correctly?)
What I've tried:
Removing the path mapping → useRoute becomes any
Pointing the path mapping to ./types/typed-router → same issue
Creating a bridge .d.ts file with triple-slash references → no effect
Has anyone got typed routes working in a Bun monorepo? Any ideas? 🙏