Babel

Table of Contents

CLI

npm install --save-dev babel-cli

Integration with webpack

npm install --save-dev babel-loader babel-core
module: {
  rules: [
    { test: /\.js$/, exclude: /node_modules/, loader: "babel-loader" }
  ]
}

Options

Plugins

Presets

env

Babel preset that automatically determines the Babel plugins you need based on your supported environments. Install with @babel/preset-env, NOT babel-preset-env