Use next generation JavaScript, today. These are not my words. When I was visiting the babel website , I read these words. If you don’t know it, I am explaining at next paragraph.

What is Babel?

When using new JavaScript functions Babel convert the code for supporting browser format. So Babel is a JavaScript compiler.

For example;

Input ↴

Output ↴

User guide

  • Make sure you are transforming as few files as possible.
    • You can also speed up babel-loader using cacheDirectory option. This will cache transformations to the filesystem.
      • Babel uses very small helpers for common functions such as _extend. By default, this will be added to every file that requires it. You can instead require the Babel runtime as a separate module to avoid the duplication.