Let\'s say I want to use Immutable in my project (or any given npm package). I have npm installed it, so it is in node_modules. Of course, it has Commo
npm install
node_modules
Babel.js contributor here. You're looking for the following:
import * as Immutable from 'immutable'; // compiles to: var Immutable = require('immutable');
Interactive demo
Note: This is with either the common or commonInterop modules option. For others, see: https://babeljs.io/docs/usage/modules/
common
commonInterop