From 1cf77ecc2a96bf7790e07120a3209c2991e42642 Mon Sep 17 00:00:00 2001 From: Pawel Zelawski Date: Thu, 10 Apr 2025 12:02:41 +0200 Subject: fix: add explicit exports field to package.json Added the "exports" field to define proper entry points for ESM (`import`) and CJS (`require`) resolution. This fixes issues where consumers using ESM could not find named exports like `generateDigiIDUri` or `DigiIDError`. --- package.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'package.json') diff --git a/package.json b/package.json index 990ea54..be2e691 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,18 @@ "module": "dist/digiid-ts.es.js", "types": "dist/index.d.ts", "type": "module", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.ts", + "default": "./dist/digiid-ts.es.js" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/digiid-ts.umd.js" + } + } + }, "files": [ "dist" ], -- cgit v1.2.3