Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

rollup can only load the functions of lodash you actually use into your bundle


So can lodash. That's what the author is doing here by using

  import throttle from 'lodash/throttle';
rather than

  import { throttle } from 'lodash';




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: