From 4d152c42e2dc70953440757ecbe1946881126059 Mon Sep 17 00:00:00 2001 From: James Pulec Date: Tue, 4 Jun 2024 12:12:20 -0700 Subject: [PATCH] fix: correct types conditional export ordering As stated in the typescript docs, `types` exports should always come first, so that they are resolved correctly. This also applies to the nested `types` within and `exports` condition. --- packages/nextjs/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nextjs/package.json b/packages/nextjs/package.json index fcfedc6c6767..346b45803d3b 100644 --- a/packages/nextjs/package.json +++ b/packages/nextjs/package.json @@ -15,6 +15,7 @@ "exports": { "./package.json": "./package.json", ".": { + "types": "./build/types/index.types.d.ts", "edge": { "import": "./build/esm/edge/index.js", "require": "./build/cjs/edge/index.js", @@ -40,8 +41,7 @@ "require": "./build/cjs/index.client.js" }, "node": "./build/cjs/index.server.js", - "import": "./build/esm/index.server.js", - "types": "./build/types/index.types.d.ts" + "import": "./build/esm/index.server.js" }, "./import": { "import": {