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
This commit is contained in:
Dylan Fiedler
2024-03-12 03:46:39 -06:00
committed by GitHub
parent 9403af8a6d
commit 4e57cedc95

View File

@@ -4,13 +4,12 @@
"description": "An implementation of the SmartWeave smart contract protocol.", "description": "An implementation of the SmartWeave smart contract protocol.",
"types": "./lib/types/index.d.ts", "types": "./lib/types/index.d.ts",
"main": "./lib/cjs/index.js", "main": "./lib/cjs/index.js",
"browser": { "browser": "./bundles/web.bundle.min.js",
"./lib/cjs/index.js": "./bundles/web.bundle.min.js",
"types": "./lib/types/index.d.ts"
},
"exports": { "exports": {
"./web": { "./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" "types": "./lib/types/index.d.ts"
}, },
"./mjs": { "./mjs": {