Skip to content

Instantly share code, notes, and snippets.

@mitevpi
Created December 12, 2019 17:25
Show Gist options
  • Save mitevpi/31dc42d23116132c85479e465f07174b to your computer and use it in GitHub Desktop.
Save mitevpi/31dc42d23116132c85479e465f07174b to your computer and use it in GitHub Desktop.
ES6 Module Imports
import defaultExport from "module-name";
import * as name from "module-name";
import { export1 } from "module-name";
import { export1 as alias1 } from "module-name";
import { export1 , export2 } from "module-name";
import { foo , bar } from "module-name/path/to/specific/un-exported/file";
import { export1 , export2 as alias2 , [...] } from "module-name";
import defaultExport, { export1 [ , [...] ] } from "module-name";
import defaultExport, * as name from "module-name";
import "module-name";
var promise = import("module-name");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment