safe-global / safe-apps-sdk

Client-side SDKs to create third-party Safe Apps
https://safe.global
MIT License
250 stars 117 forks source link

add `package.json#sideEffects` #500

Closed tmm closed 1 year ago

tmm commented 1 year ago

Would be great if package.json#sideEffects was added to @safe-global/safe-apps-provider and @safe-global/safe-apps-sdk.

Without "sideEffects" switched off (e.g. "sideEffects": false) build systems aren't able to properly eliminate dead code (e.g. Next.js) and could still load these packages even if they are not used.

More info: https://webpack.js.org/guides/tree-shaking/#mark-the-file-as-side-effect-free