Last active
March 18, 2018 21:22
-
-
Save didierfranc/0fe06c044612eabb332e91627be8e31e to your computer and use it in GitHub Desktop.
This file contains hidden or 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() makes your old es6 import async | |
// it simply return a ... Promise 😻 | |
import MyComponent from './MyComponent' | |
import('./MyComponent').then(MyComponent => ...) | |
// You can name your chunks if you want 😘 | |
import(/* webpackChunkName: "my-component" */ './MyComponent') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment