My script uses webpack + babel to build 2 bundles. 1 for modern ES6 bundle and 2nd is the legacy ES5 bundle.
Here is the .babelrs.js config
.babelrs.js
pr