jprichardson / node-fs-extra

Node.js: extra methods for the fs object like copy(), remove(), mkdirs()
MIT License
9.47k stars 772 forks source link

chore: "sideEffects": false #941

Closed jacob-ebey closed 2 years ago

jacob-ebey commented 2 years ago

Add "sideEffects": false to package.json to allow frameworks that mix client and server code in the same files to tree-shake out fs-extra from client bundles.

RyanZim commented 2 years ago

I've never heard of this key; what bundlers use it? Where's it documented?

jacob-ebey commented 2 years ago

All of them: https://esbuild.github.io/api/#conditionally-injecting-a-file https://webpack.js.org/guides/tree-shaking/ https://www.npmjs.com/package/@rollup/plugin-node-resolve/v/13.0.6#user-content-ignoresideeffectsforroot

jacob-ebey commented 2 years ago

🎉🥳 Thank you! When can we look forward to a release?

RyanZim commented 2 years ago

Published v10.0.1