Skip to content

Instantly share code, notes, and snippets.

@frebro
Created December 20, 2016 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frebro/2b0965b85e0f08dcd69a03f1c98a872f to your computer and use it in GitHub Desktop.
Save frebro/2b0965b85e0f08dcd69a03f1c98a872f to your computer and use it in GitHub Desktop.
How to export imported object in ES6

http://stackoverflow.com/questions/37200080/how-to-export-imported-object-in-es6

export imports

import d, {obj} from '...';

export {obj, d};
// or
export {obj as name1, d as name2};

re-export all named imports

export * from '...';

re-export some named imports

export {a, b as name1} from '...';

re-export default import as default export

export {default} from '...';

re-export default import as named export

export {default as name1} from '...';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment