From f04c6154ed88a7b492f7b3d1484a6e2614368080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez?= Date: Mon, 9 Dec 2024 11:49:39 +0100 Subject: [PATCH] fix(nuxt): correct types for `nuxt` and `nuxt/app` (#30148) --- packages/nuxt/app.d.ts | 2 +- packages/nuxt/package.json | 8 ++++++++ packages/nuxt/src/app/types/augments.d.ts | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/nuxt/app.d.ts b/packages/nuxt/app.d.ts index 87a04c5795..4e453551ce 100644 --- a/packages/nuxt/app.d.ts +++ b/packages/nuxt/app.d.ts @@ -1 +1 @@ -export * from './dist/app/index.js' +export * from './dist/app/index' diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index b5795e54f1..f994e3b5ad 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -43,6 +43,14 @@ "#app": { "types": "./dist/app/index.d.ts", "import": "./dist/app/index.js" + }, + "#app/defaults": { + "types": "./dist/app/defaults.d.ts", + "import": "./dist/app/defaults.js" + }, + "#app/nuxt": { + "types": "./dist/app/nuxt.d.ts", + "import": "./dist/app/nuxt.js" } }, "files": [ diff --git a/packages/nuxt/src/app/types/augments.d.ts b/packages/nuxt/src/app/types/augments.d.ts index 5e5dd8cf44..89d3482309 100644 --- a/packages/nuxt/src/app/types/augments.d.ts +++ b/packages/nuxt/src/app/types/augments.d.ts @@ -1,5 +1,5 @@ import type { UseHeadInput } from '@unhead/vue' -import type { NuxtApp, useNuxtApp } from '../nuxt' +import type { NuxtApp, useNuxtApp } from '../nuxt.js' declare global { namespace NodeJS {