From 0520ceea85a7e2ef963f5858db48b8040a15c1da Mon Sep 17 00:00:00 2001 From: Jason Antwi-Appah Date: Sat, 26 Sep 2026 10:32:07 -0500 Subject: [PATCH] chore: enable typedPages and typescriptPlugin experimental flags - typedPages: generated typed router (.nuxt/types/typed-router.d.ts) with the vue-router sfc-typed-router Volar plugin. useRoute("name") is now name-checked; path-based calls (navigateTo, router.push, ) get completion via _LiteralUnion, which keeps arbitrary strings allowed. - typescriptPlugin: registers the @dxup/unimport and @dxup/nuxt language service plugins for editor DX (auto-import go-to-definition). Not enabled: routeTypedFetch and strictRouteTypes. Both exist on the nuxt `4.x` branch but are absent from every published version (4.5.2 is latest), so the schema rejects them; strictRouteTypes also requires routeTypedFetch. --- nuxt.config.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nuxt.config.ts b/nuxt.config.ts index 874b318..2113a76 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -4,6 +4,12 @@ export default defineNuxtConfig({ devtools: { enabled: true }, modules: ['@nuxt/ui', '@nuxt/image', '@nuxt/eslint'], css: ['./assets/css/main.css'], + experimental: { + // Typed router: navigateTo, , router.push() and useRoute(). + typedPages: true, + // Better TypeScript DX via the @dxup/nuxt module. + typescriptPlugin: true, + }, // Prettier owns formatting; ESLint handles logic only (no stylistic rules). eslint: { config: {