body-scroll-lock icon indicating copy to clipboard operation
body-scroll-lock copied to clipboard

Fix tree shake by adding some `/* @__PURE__ */` marks

Open 0x009922 opened this issue 2 years ago • 0 comments

Description

I've added /* @__PURE__ */ marks in a few places. In particular - in hasPassiveEvents and isIosDevice initialization code. Unless these variables are actually used in the final bundle, their initialization code now can be safely removed.

More about tree shake annotations:

  • https://webpack.js.org/guides/tree-shaking/#clarifying-tree-shaking-and-sideeffects
  • https://rollupjs.org/guide/en/#danger-zone → treeshake.annotations
  • https://esbuild.github.io/api/#pure

Linked issues

Fixes #254

0x009922 avatar May 30 '22 06:05 0x009922