Created
July 9, 2021 17:59
-
-
Save jupegarnica/134c3846a33009b3a1e128fe81dc7bae to your computer and use it in GitHub Desktop.
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
// These give you a live reference to the exported thing(s): | |
import { thing } from './module.js'; | |
import { thing as otherName } from './module.js'; | |
import * as module from './module.js'; | |
const module = await import('./module.js'); | |
// This assigns the current value of the export to a new identifier: | |
let { thing } = await import('./module.js'); | |
// These export a live reference: | |
export { thing }; | |
export { thing as otherName }; | |
export { thing as default }; | |
// These export the current value: | |
export default thing; | |
export default 'hello!'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment