Created
September 21, 2017 14:49
-
-
Save peterschmiz/bda72e0a1a0d19ab3717bb939aef96e8 to your computer and use it in GitHub Desktop.
Import differences in ES6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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