Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

exports map breaks types downstream #118

Open
turadg opened this issue Apr 2, 2024 · 0 comments
Open

exports map breaks types downstream #118

turadg opened this issue Apr 2, 2024 · 0 comments

Comments

@turadg
Copy link
Member

turadg commented Apr 2, 2024

Firstly, thanks for your work on this project! 馃槈

Today I used patch-package to patch jessie.js@0.3.4 for the project I'm working on.

Switching agoric-sdk moduleResolution from node to bundler caused the resolver to fail to find the exports of the jessie.js package. A work-around was to remove the exports map.

By default patch-package ignores package.json so this diff was made with yarn patch-package --exclude nothing

diff --git a/node_modules/jessie.js/package.json b/node_modules/jessie.js/package.json
index 24f0881..da02cf8 100644
--- a/node_modules/jessie.js/package.json
+++ b/node_modules/jessie.js/package.json
@@ -16,10 +16,6 @@
   },
   "main": "./src/main.js",
   "types": "./types/main.d.ts",
-  "exports": {
-    "./package.json": "./package.json",
-    ".": "./src/main.js"
-  },
   "scripts": {
     "build": "yarn build:types",
     "build:types": "tsc -p jsconfig.build.json --outDir types",

There may be a better solution so I'm just filing this as an issue instead of a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant