How to transform ES6 to ES5 in your NPM package.

Here’s how to do it:

  • install babel npm install --save-dev @babel/cli @babel/core @babel/preset-env
  • just run a command babel src /index.js -d dist