Skip to content

Instantly share code, notes, and snippets.

@peterschmiz
Created September 21, 2017 14:49
Show Gist options
  • Save peterschmiz/bda72e0a1a0d19ab3717bb939aef96e8 to your computer and use it in GitHub Desktop.
Save peterschmiz/bda72e0a1a0d19ab3717bb939aef96e8 to your computer and use it in GitHub Desktop.
Import differences in ES6
import { forEach } from 'lodash';
// vs.
import forEach from 'lodash/forEach';
// First import bundles the whole lodash library while
// the second import only the core and the forEach!
// Big difference in the final file size!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment