ES6 modules are not what your bundler is doing

Writing import and export does not mean the browser is loading modules. Babel rewrites both into CommonJS, webpack resolves them at build time, and what ships is one file with a small runtime — so the semantics you get are the bundler’s, not the specification’s.

// what you write
import { format } from './money';

// what Babel emits
var _money = require('./money');

// so this works, and should not
const name = './mo' + 'ney';
require(name);   // dynamic, resolved at runtime by webpack

The difference that bites is circular imports: real ES modules hoist bindings and tolerate a cycle, CommonJS gives you a partially-populated object and a member that is undefined at the moment you read it. If a module works when imported from one file and breaks from another, look for the cycle before looking at the code.