From e14fb352f7d4e02dfc6241bf6be1cfdd930f0262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Connor=20B=C3=A4r?= Date: Thu, 17 Oct 2024 09:50:23 +0200 Subject: [PATCH] Add exports field --- .changeset/nasty-seahorses-decide.md | 5 +++++ package.json | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 .changeset/nasty-seahorses-decide.md diff --git a/.changeset/nasty-seahorses-decide.md b/.changeset/nasty-seahorses-decide.md new file mode 100644 index 0000000..8bc8dd4 --- /dev/null +++ b/.changeset/nasty-seahorses-decide.md @@ -0,0 +1,5 @@ +--- +'@sumup-oss/intl': patch +--- + +Added the `exports` field to the `package.json` file to fix Node.js' module resolution for bundlers that support ES modules. diff --git a/package.json b/package.json index 4d30dc4..232c22c 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,11 @@ "main": "dist/cjs/index.js", "module": "dist/es/index.js", "types": "dist/es/index.d.ts", + "exports": { + "require": "./dist/cjs/index.js", + "import": "./dist/es/index.js", + "types": "./dist/es/index.d.ts" + }, "sideEffects": false, "files": [ "dist",