{"_id":"is-tree-shakable","_rev":"11-64eef4e490c5ebace935ede83c98bdd8","name":"is-tree-shakable","dist-tags":{"latest":"0.5.0"},"versions":{"0.1.0":{"name":"is-tree-shakable","version":"0.1.0","license":"MIT","_id":"is-tree-shakable@0.1.0","maintainers":[{"name":"patrickmichalik","email":"contact@patrickmichalik.com"}],"bin":{"is-tree-shakable":"build/index.js"},"dist":{"shasum":"9a91a901602495efc41556cc45cafe3c317a6c83","tarball":"https://registry.npmjs.org/is-tree-shakable/-/is-tree-shakable-0.1.0.tgz","fileCount":9,"integrity":"sha512-DoO80ne9b+GaLBbuWTh6H+4o1xZfKiEyZ1/Br9oCqn2aqm20MHECnnW7IHH6ijeFUbLV22cSD65mQuGvYe0sbA==","signatures":[{"sig":"MEYCIQCg8W4yhKb5CSlRHGJWA5/Jtm6iVhTQpbfmBSPGmVcjpgIhAKxwVTr+1p+V0SvA6v8m3mXKaguMG7fF3wInx5HsNOWN","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12292},"main":"build/index.js","types":"build/index.d.ts","gitHead":"cc20bb0d95e138290d9e00d61a6f9f284f6849ee","scripts":{"build":"tsc"},"_npmUser":{"name":"patrickmichalik","email":"contact@patrickmichalik.com"},"_npmVersion":"10.8.2","directories":{},"_nodeVersion":"20.19.5","dependencies":{"acorn":"8.15.0","rollup":"4.52.2","@rollup/plugin-virtual":"3.0.2"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"5.9.2","@types/node":"24.5.2","@tsconfig/recommended":"1.0.10"},"_npmOperationalInternal":{"tmp":"tmp/is-tree-shakable_0.1.0_1758876464378_0.6398647575338645","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"is-tree-shakable","version":"0.2.0","license":"MIT","_id":"is-tree-shakable@0.2.0","maintainers":[{"name":"patrickmichalik","email":"contact@patrickmichalik.com"}],"bin":{"is-tree-shakable":"build/index.js"},"dist":{"shasum":"49615e541177881298c1f51fed27d01d465eefe3","tarball":"https://registry.npmjs.org/is-tree-shakable/-/is-tree-shakable-0.2.0.tgz","fileCount":38,"integrity":"sha512-+FprYz3iYlCh6PTYUYPGm8YcHTVHCzE8olqqx/Isy014YmPlQqZFr5Wlbf7+er0qPbPuS1f6mTlBUHZuOedQlA==","signatures":[{"sig":"MEYCIQDqzMume5goJqxm8m11fpCPKc+WAP+gyFXfPXGiIOLA3QIhAMzEBhoBZpQ3ZY7JdIcJUfrVhkltemVp40poPI3gTBDs","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":104854},"main":"build/index.js","types":"build/index.d.ts","gitHead":"75e284ac6bd0aab6d957ce10cb3de126ad6d050c","scripts":{"build":"tsc"},"_npmUser":{"name":"patrickmichalik","email":"contact@patrickmichalik.com"},"_npmVersion":"10.8.2","description":"This is a command-line tree-shakability checker for JavaScript packages. Compared to alternatives, it not only reports whether a package is tree-shakable but also pinpoints the root causes of non-tree-shakability in the JavaScript or TypeScript&nbsp;sourc","directories":{},"_nodeVersion":"20.19.5","dependencies":{"acorn":"8.15.0","chalk":"5.6.2","rollup":"4.52.2","acorn-walk":"8.3.4","source-map":"0.7.6","@rollup/plugin-virtual":"3.0.2"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"5.9.2","@types/node":"24.5.2","@tsconfig/recommended":"1.0.10"},"_npmOperationalInternal":{"tmp":"tmp/is-tree-shakable_0.2.0_1759419375366_0.7384993377061573","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"is-tree-shakable","version":"0.2.1","license":"MIT","_id":"is-tree-shakable@0.2.1","maintainers":[{"name":"patrickmichalik","email":"contact@patrickmichalik.com"}],"bin":{"is-tree-shakable":"build/index.js"},"dist":{"shasum":"d90a5562b2ccc4342c54ae92561d7895622ca262","tarball":"https://registry.npmjs.org/is-tree-shakable/-/is-tree-shakable-0.2.1.tgz","fileCount":32,"integrity":"sha512-QQ7FjvcRnRfFLtuFS6tXdQWrQSqYtH59gPwXkAYJJzhk90vdN4bqR+W+C4vHj0oS14jyBriQMN4aIDUQr3LR0w==","signatures":[{"sig":"MEUCIA8dXLyUwVWOle42LDMpD+wXNnqHHPU8c2tzdOz9010HAiEA3h2ZdARMOEvcrscrcKmbuAsUAC6HJK4mUzZFu8aDYOk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":97793},"main":"build/index.js","types":"build/index.d.ts","gitHead":"93ede8fc570509f90de2184ef3036658294a714d","scripts":{"build":"tsc"},"_npmUser":{"name":"patrickmichalik","email":"contact@patrickmichalik.com"},"_npmVersion":"10.8.2","description":"![](https://img.shields.io/npm/v/is-tree-shakable)","directories":{},"_nodeVersion":"20.19.5","dependencies":{"acorn":"8.15.0","chalk":"5.6.2","rollup":"4.52.2","acorn-walk":"8.3.4","source-map":"0.7.6","@rollup/plugin-virtual":"3.0.2"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"5.9.2","@types/node":"24.5.2","@tsconfig/recommended":"1.0.10"},"_npmOperationalInternal":{"tmp":"tmp/is-tree-shakable_0.2.1_1763372049341_0.6337357689490275","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"is-tree-shakable","version":"0.3.1","license":"MIT","_id":"is-tree-shakable@0.3.1","maintainers":[{"name":"patrickmichalik","email":"contact@patrickmichalik.com"}],"bin":{"is-tree-shakable":"build/index.js"},"dist":{"shasum":"de3fa6b24f517a50320b6847d76080638a424ac8","tarball":"https://registry.npmjs.org/is-tree-shakable/-/is-tree-shakable-0.3.1.tgz","fileCount":52,"integrity":"sha512-R+nZBnUuwpqt/Lt/ZqTckOkcGFbuIvNX+4OWAaKzagGu28M2Rs4V0uq7qJkkRi7g/dQJRK72Fpur9+64rJgZig==","signatures":[{"sig":"MEYCIQCGC77FDeNGDHTEg7wZfnEcOnskaOxmmfcNF4yZnafbfgIhAJaauPkVtNOoIch4UiorApOzrBgaBtEvNs6keJPvw3U4","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":112556},"main":"build/index.js","types":"build/index.d.ts","gitHead":"a7b2bbde631e25d797ac2d7cded6a842af3c4692","scripts":{"test":"vitest run","build":"tsc","playground":"tsx playground/run.ts"},"_npmUser":{"name":"patrickmichalik","email":"contact@patrickmichalik.com"},"_npmVersion":"10.8.2","description":"![](https://img.shields.io/npm/v/is-tree-shakable)","directories":{},"_nodeVersion":"20.19.5","dependencies":{"acorn":"8.15.0","chalk":"5.6.2","rollup":"4.52.2","acorn-walk":"8.3.4","source-map":"0.7.6","@rollup/plugin-virtual":"3.0.2"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"4.21.0","vitest":"4.0.9","typescript":"5.9.2","@types/node":"24.5.2","@tsconfig/recommended":"1.0.10"},"_npmOperationalInternal":{"tmp":"tmp/is-tree-shakable_0.3.1_1764846787322_0.41960516419766436","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"is-tree-shakable","version":"0.4.0","license":"MIT","_id":"is-tree-shakable@0.4.0","maintainers":[{"name":"patrickmichalik","email":"contact@patrickmichalik.com"}],"homepage":"https://github.com/software-mansion-labs/is-tree-shakable#readme","bugs":{"url":"https://github.com/software-mansion-labs/is-tree-shakable/issues"},"bin":{"is-tree-shakable":"build/index.js"},"dist":{"shasum":"801335e8a738303f4b67924e3d6abc04c297a16c","tarball":"https://registry.npmjs.org/is-tree-shakable/-/is-tree-shakable-0.4.0.tgz","fileCount":65,"integrity":"sha512-gQA+3rebwLEd3tY4SRrQl3gTKVpM1+k3ObsN4rrNqewfvXj6muCcanoXKcJOn3XEVsbcukfUxAoTZ+9yFnTlHw==","signatures":[{"sig":"MEYCIQDYNKKhotlStY23KAgpdmizLgLxhUJJuq4HONfCEcKTYgIhAPSpg58fkC4vUFM1wLez80i53JpIOE/hqQc9ek/xQTa6","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/is-tree-shakable@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":133792},"main":"build/index.js","types":"build/index.d.ts","gitHead":"e6de1ed3d44c34cd87c47ff8a3ae99a2bc834193","scripts":{"test":"vitest run","build":"tsc","playground":"tsx playground/run.ts"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:36c8550a-3620-479f-aee6-37b325433a30"}},"repository":{"url":"git+https://github.com/software-mansion-labs/is-tree-shakable.git","type":"git"},"_npmVersion":"11.7.0","description":"![](https://img.shields.io/npm/v/is-tree-shakable)","directories":{},"_nodeVersion":"20.19.6","dependencies":{"acorn":"8.15.0","chalk":"5.6.2","rollup":"4.52.2","acorn-walk":"8.3.4","source-map":"0.7.6","@rollup/plugin-virtual":"3.0.2","@rollup/plugin-node-resolve":"16.0.3"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"4.21.0","vitest":"4.0.9","typescript":"5.9.2","@types/node":"24.5.2","@tsconfig/recommended":"1.0.10"},"_npmOperationalInternal":{"tmp":"tmp/is-tree-shakable_0.4.0_1765881003867_0.7363098690881902","host":"s3://npm-registry-packages-npm-production"}},"0.4.1":{"name":"is-tree-shakable","version":"0.4.1","license":"MIT","_id":"is-tree-shakable@0.4.1","maintainers":[{"name":"patrickmichalik","email":"contact@patrickmichalik.com"}],"homepage":"https://github.com/software-mansion-labs/is-tree-shakable#readme","bugs":{"url":"https://github.com/software-mansion-labs/is-tree-shakable/issues"},"bin":{"is-tree-shakable":"build/index.js"},"dist":{"shasum":"84f5396da9ac298bd1ff67d3590d9aecbcc2e9e9","tarball":"https://registry.npmjs.org/is-tree-shakable/-/is-tree-shakable-0.4.1.tgz","fileCount":65,"integrity":"sha512-3DzYTCnGqrWZTIox6fueyt8Q0RIrah2bdilQXSzEiJe0cE7GThZKDxfZZm1r0dVeoDZ50oj80+Zgqvb8vMqAHA==","signatures":[{"sig":"MEUCIAcyFBlARucNN2DJYYlQn26X+0ZqGW2Gp+Ii8W1LrYRYAiEAzydRlox1Vu3bfOnQleP2gaIMotRz7gHF6KymxFTW1qc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/is-tree-shakable@0.4.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":134229},"main":"build/index.js","types":"build/index.d.ts","gitHead":"095462e86edfef82d0e68a227d34cf9a94fefb7e","scripts":{"test":"vitest run","build":"tsc","playground":"tsx playground/run.ts"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:36c8550a-3620-479f-aee6-37b325433a30"}},"repository":{"url":"git+https://github.com/software-mansion-labs/is-tree-shakable.git","type":"git"},"_npmVersion":"11.7.0","description":"![](https://img.shields.io/npm/v/is-tree-shakable)","directories":{},"_nodeVersion":"20.19.6","dependencies":{"acorn":"8.15.0","chalk":"5.6.2","rollup":"4.52.2","acorn-walk":"8.3.4","source-map":"0.7.6","@rollup/plugin-virtual":"3.0.2","@rollup/plugin-node-resolve":"16.0.3"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"4.21.0","vitest":"4.0.9","typescript":"5.9.2","@types/node":"24.5.2","@tsconfig/recommended":"1.0.10"},"_npmOperationalInternal":{"tmp":"tmp/is-tree-shakable_0.4.1_1766416407989_0.018462035395625076","host":"s3://npm-registry-packages-npm-production"}},"0.4.2":{"name":"is-tree-shakable","version":"0.4.2","license":"MIT","_id":"is-tree-shakable@0.4.2","maintainers":[{"name":"patrickmichalik","email":"contact@patrickmichalik.com"}],"homepage":"https://github.com/software-mansion-labs/is-tree-shakable#readme","bugs":{"url":"https://github.com/software-mansion-labs/is-tree-shakable/issues"},"bin":{"is-tree-shakable":"build/index.js"},"dist":{"shasum":"7e90e038c02916daf2a7d11bcb0dd60272d289fb","tarball":"https://registry.npmjs.org/is-tree-shakable/-/is-tree-shakable-0.4.2.tgz","fileCount":65,"integrity":"sha512-3m2i67ZdnEF4WUgQUo4Zd5J6WTYF+qGA9QUsN24l33DwgKezUjHGmj0X6bB6zdTSCrH55c04VXuAodUWyHQZKA==","signatures":[{"sig":"MEQCIAQ+Wck6tFydmifW6YqRnVoD3XZJ9ik9F5dNU6wyiSE7AiBF1mJiZQ+a+2AFXToZWACkw+7d1jX6Z7GWslZTQk+g7g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/is-tree-shakable@0.4.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":134246},"main":"build/index.js","types":"build/index.d.ts","gitHead":"977715c19963d68a9a0fdfb9bd62b700cf0f8556","scripts":{"test":"vitest run","build":"tsc","playground":"tsx playground/run.ts"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:36c8550a-3620-479f-aee6-37b325433a30"}},"repository":{"url":"git+https://github.com/software-mansion-labs/is-tree-shakable.git","type":"git"},"_npmVersion":"11.7.0","description":"![](https://img.shields.io/npm/v/is-tree-shakable)","directories":{},"_nodeVersion":"20.19.6","dependencies":{"acorn":"8.15.0","chalk":"5.6.2","rollup":"4.52.2","acorn-walk":"8.3.4","source-map":"0.7.6","@rollup/plugin-virtual":"3.0.2","@rollup/plugin-node-resolve":"16.0.3"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"4.21.0","vitest":"4.0.9","typescript":"5.9.2","@types/node":"24.5.2","@tsconfig/recommended":"1.0.10"},"_npmOperationalInternal":{"tmp":"tmp/is-tree-shakable_0.4.2_1766666787410_0.9850914520171152","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"is-tree-shakable","version":"0.5.0","license":"MIT","_id":"is-tree-shakable@0.5.0","maintainers":[{"name":"patrickmichalik","email":"contact@patrickmichalik.com"}],"homepage":"https://github.com/software-mansion-labs/is-tree-shakable#readme","bugs":{"url":"https://github.com/software-mansion-labs/is-tree-shakable/issues"},"bin":{"is-tree-shakable":"build/index.js"},"dist":{"shasum":"4a94500dc8e81141befc896bf2efba30d232cc55","tarball":"https://registry.npmjs.org/is-tree-shakable/-/is-tree-shakable-0.5.0.tgz","fileCount":67,"integrity":"sha512-i47D82JU4FF0QWdMTnQi4sRcoQNx0VSfI4fIYndVTx6NxCn/Y5Qac9I3rtAWl9FQSl0KIGRnGeL35QrN/QUkrg==","signatures":[{"sig":"MEUCIQD5eahDDiC3/0MiAUacVb9hwWXxj8UWOv5r9HeYlT+eAQIgSR0P93KMKFWVUpGtK2oksCiZEdKlqiYUJJE92JXdcuM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/is-tree-shakable@0.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":140121},"main":"build/index.js","types":"build/index.d.ts","gitHead":"3deadd0fa380793f63ed1eb3b692942971bd9d68","scripts":{"test":"vitest run","build":"tsc","playground":"tsx playground/run.ts"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:36c8550a-3620-479f-aee6-37b325433a30"}},"repository":{"url":"git+https://github.com/software-mansion-labs/is-tree-shakable.git","type":"git"},"_npmVersion":"11.7.0","description":"![](https://img.shields.io/npm/v/is-tree-shakable)","directories":{},"_nodeVersion":"20.20.0","dependencies":{"acorn":"8.15.0","chalk":"5.6.2","rollup":"4.52.2","acorn-walk":"8.3.4","source-map":"0.7.6","@rollup/plugin-virtual":"3.0.2","@rollup/plugin-node-resolve":"16.0.3"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"4.21.0","vitest":"4.0.9","typescript":"5.9.2","@types/node":"24.5.2","@tsconfig/recommended":"1.0.10"},"_npmOperationalInternal":{"tmp":"tmp/is-tree-shakable_0.5.0_1773671253652_0.09312659198473328","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2025-09-26T08:47:44.376Z","modified":"2026-05-20T15:25:12.249Z","0.1.0":"2025-09-26T08:47:44.586Z","0.2.0":"2025-10-02T15:36:15.574Z","0.2.1":"2025-11-17T09:34:09.556Z","0.3.0":"2025-12-04T10:35:14.760Z","0.3.1":"2025-12-04T11:13:07.459Z","0.4.0":"2025-12-16T10:30:04.033Z","0.4.1":"2025-12-22T15:13:28.167Z","0.4.2":"2025-12-25T12:46:27.550Z","0.5.0":"2026-03-16T14:27:33.803Z"},"bugs":{"url":"https://github.com/software-mansion-labs/is-tree-shakable/issues"},"license":"MIT","homepage":"https://github.com/software-mansion-labs/is-tree-shakable#readme","repository":{"url":"git+https://github.com/software-mansion-labs/is-tree-shakable.git","type":"git"},"description":"![](https://img.shields.io/npm/v/is-tree-shakable)","maintainers":[{"email":"npm@swmansion.com","name":"swm-bot"},{"email":"contact@patrickmichalik.com","name":"patrickmichalik"}],"readme":"# `is-tree-shakable`\n\n![](https://img.shields.io/npm/v/is-tree-shakable)\n\nThis is a command&zwj;-&zwj;line tree&zwj;-&zwj;shakability doctor for JavaScript packages. Compared\nto alternatives, it not only reports whether a package is tree&zwj;-&zwj;shakable but also pinpoints\nthe root causes of non&zwj;-&zwj;tree&zwj;-&zwj;shakability in the JavaScript or\nTypeScript&nbsp;source.\n\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/software-mansion-labs/is-tree-shakable/refs/heads/main/example.png\" />\n</p>\n\n## Getting started\n\n1. Ensure that your package’s `package.json` file specifies\n   [`\"main\"`](https://docs.npmjs.com/cli/v7/configuring-npm/package-json#main),\n   [`\"module\"`](https://rollupjs.org/introduction/#publishing-es-modules),\n   or&nbsp;[`\"browser\"`](https://github.com/defunctzombie/package-browser-field-spec).\n\n2. If your package is built, enable source&zwj;-&zwj;map generation. For TypeScript, this is done\n   via&nbsp;[`\"sourceMap\"`](https://www.typescriptlang.org/tsconfig/#sourceMap).\n\n## Usage\n\n1. If your package is built, run the build&nbsp;step.\n\n2. Run `is-tree-shakable` in the package&nbsp;root:\n\n   - base resolution:\n\n     ```sh\n     npx is-tree-shakable\n     ```\n\n   - web resolution (supports\n     [`\"browser\"`](https://github.com/defunctzombie/package-browser-field-spec) and&nbsp;`.web.js`):\n\n     ```sh\n     npx is-tree-shakable --resolution web\n     ```\n\n   If the package is tree&zwj;-&zwj;shakable, `is-tree-shakable` produces no output and exits with\n   code 0; otherwise, it lists the root causes of non&zwj;-&zwj;tree&zwj;-&zwj;shakability and exits\n   with code&nbsp;1.\n\n## Background\n\n_Tree shaking_ is a technique used by modern JavaScript builds tools&zwj;—&zwj;such as Webpack,\nRollup, or Parcel&zwj;—&zwj;to remove unused code during bundling, saving space and boosting\nperformance. It’s particularly beneficial for package consumers, who often use only a subset of the\nexported members. While tree shaking occurs in the consumer’s build pipeline, a package must meet\ntwo criteria to enable the removal of its unconsumed code. When this is the case, the package\nis&nbsp;_tree&zwj;-&zwj;shakable_.\n\n1. It must use ES6&nbsp;modules.\n\n2. It must be obviously free of externally observable side effects that occur during\n   module&nbsp;evaluation.\n\nWhile the adoption of ES6 modules is straightforward, the second requirement presents a significant\npitfall. Some logic&zwj;—&zwj;like modifying `window` at the module level&zwj;—&zwj;is evidently\nproblematic. However, because the static analysis that powers tree shaking in widely used bundlers\nis quite simplistic, they err on the side of caution and also treat many verifiably side\neffect&zwj;–&zwj;free constructs as side&zwj;-&zwj;effectful. As a result, code that could be safely\neliminated is unexpectedly&nbsp;retained.\n\n`is-tree-shakable` helps avoid this: it pinpoints constructs that block tree shaking, whether they\ntruly have externally observable side effects or merely are treated as such by bundlers.\nCollectively, these are referred to as _possibly&nbsp;side-effectful_.\n\n## Addressing non-tree-shakability\n\nWhen `is-tree-shakable` flags a construct as possibly side-effectful, evaluate if it actually has\nexternally observable side effects. If so, move it accordingly. If not, use `@__PURE__`, which is a\nstandard annotation that bundlers treat as a guarantee\nof&nbsp;non&zwj;-&zwj;side&zwj;-&zwj;effectfulness.\n\n- For call expressions, usage is&nbsp;straightforward:\n\n  ```js\n  /* @__PURE__ */ foo();\n  ```\n\n- Other constructs&zwj;—&zwj;such as property access&zwj;—&zwj;may also be reported as possibly side\n  effectful, but `@__PURE__` is applicable only to call expressions. To work around this, use\n  an&nbsp;IIFE:\n\n  ```js\n  /* @__PURE__ */ (() => bar.baz)();\n  ```\n\n## Suppression\n\nIf a construct that blocks tree shaking needs to be preserved, you can silence `is-tree-shakable`\nfor that specific statement with the `is-tree-shakable-suppress`&nbsp;directive:\n\n```js\n/* is-tree-shakable-suppress */ foo();\n```\n\n## By [Software Mansion](https://swmansion.com)\n\nFounded in 2012, [Software Mansion](https://swmansion.com) is a software agency with experience in\nbuilding web and mobile apps. We are core React Native contributors and experts in dealing with all\nkinds of React Native issues. We can help you build your next dream\nproduct&zwj;—&zwj;[hire&nbsp;us](https://swmansion.com/contact/projects?utm_source=is-tree-shakable&utm_medium=readme).\n\n[![](https://logo.swmansion.com/logo?color=white&variant=desktop&width=152&tag=is-tree-shakable-github)](https://swmansion.com)\n\n[![](https://contrib.rocks/image?repo=software-mansion-labs/is-tree-shakable)](https://github.com/software-mansion-labs/is-tree-shakable/graphs/contributors)\n","readmeFilename":"README.md"}