Skip to content

exports map breaks types downstreamΒ #118

@turadg

Description

@turadg

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions