I also struggled with this some time ago, but managed to find a working solution for me and my team.
Is it possible to configure Babel in Webpack or in a Grunt configuration?
Itβs good that itβs completely, but all that you decide: stick to it. Do not tune something there and another instrument elsewhere. Do it either completely in Webpack or Grunt.
Since all the configurations of my projects are done in Gruntfile.js , it was convenient for me to define Babel (or all my plugins in general) there. Splitting it into multiple files is just confusing .
If someone can try a different workflow with grunt-browserify using Babel and Grunt, I wrote a little ES6 template on how to set up the appropriate project.
morkro
source share