Last active
May 24, 2019 07:58
-
-
Save PierreCavalet/bae31c17ac815fb58e4944c701dc344b to your computer and use it in GitHub Desktop.
dynamic import
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
// module.js | |
const test = 'test' | |
export default test | |
// static.js | |
import test from './test' | |
console.log(test) | |
// dynamic.js | |
import('./test').then(({default: test}) => { | |
console.log(test) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment