Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

206
Views
Lodash: tree shaking

When I try to use lodash function as a specific import as shown below then it shows to be it loads only 14.7KB in size. enter image description here

But when I try to use the import as a destructured object then it shows 69.6KB in size enter image description here

Some articles say it works the same for both the above imports while some say it doesn't. Just wanted to understand does it add the complete build or only a specific function in the final build, especially the 2nd syntax (destructuring)

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

$ npm i -D babel-plugin-lodash

.babelrc
{
  ...,
  "plugins": [..., "lodash"]
}

This will allow for any import style (e.g. import _ from 'lodash', import { isEqual } from 'lodash' as the plugin will transform each usage of a lodash func to: import xyz from 'lodash/xyz';

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!