What kind of exports are more conducive to effective tree shaking?

  • Default exports
  • Named exports
  • All exports are treated equally by tree shaking.
  • Both default and named exports
Tree shaking is more effective with named exports, as it can selectively include or exclude specific exports based on usage. Default exports can still be tree shaken, but named exports provide more granularity.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *