diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 9b79b01..5083288 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Publish the ESM build by adding `module` and `exports` to the manifest, so `dist/index.mjs` is reachable instead of always resolving to the CommonJS build ([#85](https://github.com/MetaMask/mobile-wallet-protocol/pull/85)) + ## [0.4.0] ### Added diff --git a/packages/core/package.json b/packages/core/package.json index b2f4dec..f92cccd 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -11,7 +11,20 @@ }, "license": "MIT", "main": "./dist/index.js", + "module": "./dist/index.mjs", "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, "files": [ "dist" ],