ksuj-g
Last Updated: February 25, 2016
·
357
· mruzekw
B751815d44ec8c76564ce58bbb689944

Import CommonJS modules without default export via ES6

Without default

import * as foo from "foo";

var foo = require("foo");

With default

import foo from "foo";

var foo = require("foo").default;

Complete conversion here: https://github.com/sebmck/6to5/blob/master/MODULES.md#common-default

Say Thanks
Respond