node package manager
We need your input. Help make JavaScript better: Take the 2017 JavaScript Ecosystem survey »

webpack-babel-installer

Installation

This one package will let you use all the new approved Javascript features in your .js files with Babel Compiler. Use npm install webpack-babel-installer instead of installing all dependencies and loaders separately.

The following dependencies will be installed:

Package name
babel-core
babel-loader
babel-preset-env
webpack

Configuration

Set loader

Add the loader to your webpack.config.js file

module: {
  rules: [
    {
      test: /\.js$/,
      exclude:/(node_modules)/,
      loader:"babel-loader",
      query:{
        presets:["env"]
      }
    }
  ]
}

Links

See also