This guide is part of The Complete Guide to ES6 with Babel 6 series. If you’re having trouble upgrading to Babel 6, start with Six Things You Need To Know About Babel 6.
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 babel-loader
…