From f44969f1ca08973e9a177882f87d7ca75239ce8a Mon Sep 17 00:00:00 2001 From: William Phetsinorath Date: Thu, 12 Mar 2026 11:57:03 +0100 Subject: [PATCH] fix: shared package for nodenext module resolution Running tests using vitest in the server-nestjs package seems to break module resolution because of nodenext module resolution. ``` Error: Failed to resolve entry for package "@cpn-console/shared". The package may have incorrect main/module/exports specified in its package.json. ``` Signed-off-by: William Phetsinorath --- packages/hooks/package.json | 6 ++++++ packages/shared/package.json | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/packages/hooks/package.json b/packages/hooks/package.json index 1b608b37d..aabc7763d 100644 --- a/packages/hooks/package.json +++ b/packages/hooks/package.json @@ -8,6 +8,12 @@ "type": "git", "url": "https://github.com/cloud-pi-native/console" }, + "exports": { + ".": { + "types": "./types/index.d.ts", + "import": "./dist/index.js" + } + }, "main": "dist/index.js", "module": "dist/index.js", "types": "types/index.d.ts", diff --git a/packages/shared/package.json b/packages/shared/package.json index 2946b5ba0..703a35a24 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -8,6 +8,12 @@ "type": "git", "url": "https://github.com/cloud-pi-native/console" }, + "exports": { + ".": { + "types": "./types/index.d.ts", + "import": "./dist/index.js" + } + }, "main": "dist/index.js", "module": "dist/index.js", "types": "types/index.d.ts",