summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPawel Zelawski <pawel.zelawski@outlook.com>2025-04-10 12:02:41 +0200
committerPawel Zelawski <pawel.zelawski@outlook.com>2025-04-10 12:02:41 +0200
commit1cf77ecc2a96bf7790e07120a3209c2991e42642 (patch)
treef21443eab5f4b6b2522d86486e64d115d8f43f79
parent2350aa140eb692610cc8ba1788ac0300188a5144 (diff)
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`.
-rw-r--r--package.json12
1 files changed, 12 insertions, 0 deletions
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"
],