From 4e57cedc954a8c8b9b485680f5f55df7799e3821 Mon Sep 17 00:00:00 2001 From: Dylan Fiedler Date: Tue, 12 Mar 2024 03:46:39 -0600 Subject: [PATCH] fix: fix browser and web exports (#514) By default - any project using `/web` should get `mjs` build - not the bundled version with no default export. Also cleans up redundant types. Fixes the error in #505 chore: remove unnecessary require in mjs export --- package.json | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 6bd407fd..cbdb09e1 100644 --- a/package.json +++ b/package.json @@ -4,13 +4,12 @@ "description": "An implementation of the SmartWeave smart contract protocol.", "types": "./lib/types/index.d.ts", "main": "./lib/cjs/index.js", - "browser": { - "./lib/cjs/index.js": "./bundles/web.bundle.min.js", - "types": "./lib/types/index.d.ts" - }, + "browser": "./bundles/web.bundle.min.js", "exports": { "./web": { - "import": "./bundles/web.bundle.min.js", + "import": "./lib/mjs/index.js", + "require": "./lib/cjs/index.js", + "browser": "./bundles/web.bundle.min.js", "types": "./lib/types/index.d.ts" }, "./mjs": {