Skip to content

Commit

Permalink
fix: reduce bundle size (#47)
Browse files Browse the repository at this point in the history
* minify and exclude dependencies

* chore: add pull request template
  • Loading branch information
simonmcallister0210 authored Nov 2, 2024
1 parent dd9c623 commit 2a21513
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### Context

_TODO - specify the context around why this change is being made_

### Changes

_TODO - leave a quick summary / list of the changes here_

### Testing

_OPTIONAL - post any additional testing you've done here_
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
},
"scripts": {
"build": "npm run build:cjs && npm run build:esm && npm run build:types",
"build:cjs": "esbuild src/index.ts --bundle --format=cjs --outfile=dist/cjs/index.js && echo '{ \"type\": \"commonjs\" }' > dist/cjs/package.json",
"build:esm": "esbuild src/index.ts --bundle --format=esm --outfile=dist/esm/index.js && echo '{ \"type\": \"module\" }' > dist/esm/package.json",
"build:cjs": "esbuild src/index.ts --bundle --packages=external --minify --format=cjs --outfile=dist/cjs/index.js && echo '{ \"type\": \"commonjs\" }' > dist/cjs/package.json",
"build:esm": "esbuild src/index.ts --bundle --packages=external --minify --format=esm --outfile=dist/esm/index.js && echo '{ \"type\": \"module\" }' > dist/esm/package.json",
"build:types": "tsc --emitDeclarationOnly --declaration src/index.ts --esModuleInterop --outDir dist/types",
"format": "npm run format:eslint && npm run format:prettier",
"format:eslint": "eslint -c .eslintrc.cjs --fix src/**",
Expand Down

0 comments on commit 2a21513

Please sign in to comment.