The Babel CLI is great for compiling ES6 to ES5 on a file-by-file basis. However, when Babel encounters an
import statement, it outputs a
require call – which won’t get you very far in the browser.
To make our Babel output browser friendly, we’ll need to bundle it. My favourite tool for this is Webpack, and as it happens, Webpack has great Babel support through