Are you ripping your hair out trying to figure out how to get
webpack to understand ES6 syntax?
I just spent 2 hours trying to figure this out. Ok, I’m lying it was more hours than I want to admit.
I just want to save everyone time.
Name your config file
Install the following packages:
npm install --save-dev webpack babel-register babel-preset-es2015
.babelrc file. This is the important bit I was missing!
Now you can run