Skip to content

Commit

Permalink
fix: fix browser and web exports (#514)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
dtfiedler committed Mar 12, 2024
1 parent 9403af8 commit 4e57ced
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit 4e57ced

Please sign in to comment.