Skip to content

Commit

Permalink
feat: remove browser bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-haynes committed Aug 20, 2024
1 parent e1e7c2f commit 60fddf3
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 287 deletions.
1 change: 0 additions & 1 deletion packages/near-api-js/browser-exports.js

This file was deleted.

2 changes: 0 additions & 2 deletions packages/near-api-js/esbuild.inject.js

This file was deleted.

22 changes: 3 additions & 19 deletions packages/near-api-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"build": "workspace:*",
"bundlewatch": "0.3.1",
"concurrently": "7.3.0",
"esbuild": "0.23.0",
"in-publish": "2.0.0",
"jest": "29.7.0",
"localstorage-memory": "1.0.3",
Expand All @@ -52,34 +51,19 @@
"keywords": [],
"license": "(MIT AND Apache-2.0)",
"scripts": {
"dist": "pnpm bundle:all",
"bundle:all": "pnpm bundle && pnpm bundle:minified",
"bundle": "esbuild browser-exports.js --bundle --outfile=dist/near-api-js.js --define:global=window --inject:esbuild.inject.js",
"bundle:minified": "esbuild browser-exports.js --bundle --minify --outfile=dist/near-api-js.min.js --define:global=window --inject:esbuild.inject.js",
"compile:esm": "tsc -p ./tsconfig.json",
"compile:cjs": "tsc -p ./tsconfig.cjs.json && cjsify ./lib/commonjs",
"dev": "pnpm compile -w",
"build": "pnpm compile:esm && pnpm compile:cjs && pnpm dist",
"build": "pnpm compile:esm && pnpm compile:cjs",
"test": "jest --passWithNoTests",
"lint": "concurrently \"pnpm:lint:*(!fix) --no-error-on-unmatched-pattern\"",
"lint:src": "eslint --ext .ts src",
"prefuzz": "pnpm build",
"fuzz": "jsfuzz test/fuzz/borsh-roundtrip.js test/fuzz/corpus/",
"clean": "pnpm rimraf lib",
"bundlewatch": "bundlewatch"
},
"bundlewatch": {
"files": [
{
"path": "dist/near-api-js.min.js",
"maxSize": "150kB"
}
]
"clean": "pnpm rimraf lib"
},
"files": [
"lib",
"dist",
"browser-exports.js"
"lib"
],
"author": "NEAR Inc",
"exports": {
Expand Down
Loading

0 comments on commit 60fddf3

Please sign in to comment.