News for hackers. Stuff that matters.

reesonz

Re:Linen.dev: The 500KB Slack Alternative on Wednesday April 26, 2023 @09:06PM (#35721997)
Many javascript programmers including library authors don't understand the tree shaking mechanisms available to them. Setting the "sideEffects" property in package.json can be very effective in detailing whether to include/exclude an entire module or certain source files:

https://webpack.js.org/guides/tree-shaking/#mark-the-file-as...

All popular bundlers (webpack, rollup, esbuild) respect that field.