title: Using babel plugin in webpack configuration file
body: <p>In their website, webpack shows plugin usage like this</p>
  
  <pre><code>  plugins: [
      new webpack.optimize.UglifyJsPlugin(),
      new HtmlWebpackPlugin({template: './src/index.html'})
    ]
  </code></pre>
  
  <p>I want to use babel plugin transform-async-to-generator, so I added it in babelrc file but I dont know this is enough, should I add it also webpack file ? If so how </p>
  
  <p>I can not be sure if writing plugin in webpack config file required because right now I am getting runtime error and not sure if it works writing only in babelrc file.</p>
  
  <p>my current webpack config file</p>
  
  <pre><code>var path = require('path')
  
  module.exports = {
    entry: path.resolve(__dirname, 'partner/index.js'),
    output: {
      path: path.resolve(__dirname, './dist'),
      filename: 'partner_bundle.js'
    },
    target: 'web',
    module: {
      rules: [
        {
          test: /\.js$/, // Check for all js files
          loader: 'babel-loader',
          query: {
            presets: [
              'babel-preset-env',
              'babel-preset-stage-0'
            ].map(require.resolve)
          },
          exclude: /node_modules\/(?!other-module)/
        }
      ]
    },
    stats: {
      colors: true
    },
    devtool: 'source-map',
    resolve: { symlinks: false }
  }
  </code></pre>
  
  <p>babelrc file</p>
  
  <pre><code>{
    "presets": [
      "env",
      "stage-2"
    ],
    "plugins": [
      "transform-async-to-generator",
      "transform-async-generator-functions",
      [
        "transform-runtime",
        {
          "helpers": false,
          "polyfill": false,
          "regenerator": true
        }
      ]
    ]
  }
  </code></pre>