Skip to content

Commit

Permalink
fix: mark package as side-effect free (#305)
Browse files Browse the repository at this point in the history
[Tree shaking](https://webpack.js.org/guides/tree-shaking/) results in smaller web bundles by deleting unused code.

This module is side-effect free so mark it as such to signal to bundlers that unused exports can be excluded from bundles.
  • Loading branch information
achingbrain committed Jan 16, 2024
1 parent c3fbb18 commit a389fe8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .aegir.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
/** @type {import('aegir').PartialOptions} */
export default {
build: {
bundlesizeMax: '143KB'
bundlesizeMax: '60KB'
}
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,5 +183,6 @@
"@libp2p/peer-id-factory": "^4.0.2",
"aegir": "^42.1.1",
"protons": "^7.3.3"
}
},
"sideEffects": false
}

0 comments on commit a389fe8

Please sign in to comment.