title: Errors when updated babel and webpack version in react project
body: <p>I am working on a <a href="https://github.com/ertanhasani/react-stars" rel="nofollow noreferrer">project</a> who was using babel version 5, webpack version 1, and ava version 0.14.0.</p>
  <p>After I did some updates when i run <code>npm run build-example</code> i get:</p>
  <blockquote>
  <p>Module build failed (from ./node_modules/babel-loader/lib/index.js):
  Error: Multiple configuration files found. Please remove one:</p>
  <ul>
  <li>package.json</li>
  <li>pathto\react-stars.babelrc</li>
  </ul>
  </blockquote>
  <p><a href="https://github.com/ertanhasani/react-stars/blob/master/package.json" rel="nofollow noreferrer">Here's my old package.json</a></p>
  <p>After updates, now I'm using babel version 7.10, webpack version 4.43, and ava version 3.10.1. Here's the updated <code>package.json</code></p>
  <pre><code>{
    &quot;name&quot;: &quot;react-rating-stars-component&quot;,
    &quot;version&quot;: &quot;2.2.0&quot;,
    &quot;description&quot;: &quot;Simple star rating component for your React projects.&quot;,
    &quot;main&quot;: &quot;dist/react-stars.js&quot;,
    &quot;repository&quot;: &quot;https://github.com/ertanhasani/react-stars&quot;,
    &quot;babel&quot;: {
      &quot;presets&quot;: [
        &quot;react&quot;,
        &quot;es2015&quot;
      ]
    },
    &quot;ava&quot;: {
      &quot;babel&quot;: {
        &quot;presets&quot;: [
          &quot;es2015&quot;,
          &quot;react&quot;
        ]
      },
      &quot;require&quot;: [
        &quot;babel-register&quot;
      ]
    },
    &quot;scripts&quot;: {
      &quot;build&quot;: &quot;babel src --out-dir dist&quot;,
      &quot;dev&quot;: &quot;babel src --out-dir dist --watch&quot;,
      &quot;build-example&quot;: &quot;webpack -p --config webpack.production.config.js&quot;,
      &quot;dev-example&quot;: &quot;webpack-dev-server . --hot --inline&quot;
    },
    &quot;keywords&quot;: [
      &quot;star&quot;,
      &quot;rating&quot;,
      &quot;react&quot;,
      &quot;stars&quot;,
      &quot;rating&quot;,
      &quot;component&quot;,
      &quot;raty&quot;,
      &quot;rate&quot;,
      &quot;reactjs&quot;,
      &quot;ratings&quot;
    ],
    &quot;author&quot;: &quot;Ertan Hasani&quot;,
    &quot;license&quot;: &quot;ISC&quot;,
    &quot;devDependencies&quot;: {
      &quot;ava&quot;: &quot;^3.10.1&quot;,
      &quot;@babel/cli&quot;: &quot;^7.10.4&quot;,
      &quot;babel-loader&quot;: &quot;^8.1.0&quot;,
      &quot;@babel/core&quot;: &quot;^7.10.4&quot;,
      &quot;@babel/plugin-transform-object-assign&quot;: &quot;^7.10.4&quot;,
      &quot;@babel/preset-env&quot;: &quot;^7.10.4&quot;,
      &quot;@babel/preset-react&quot;: &quot;^7.10.4&quot;,
      &quot;prop-types&quot;: &quot;^15.7.2&quot;,
      &quot;react&quot;: &quot;^16.13.1&quot;,
      &quot;react-addons-test-utils&quot;: &quot;^15.6.2&quot;,
      &quot;react-dom&quot;: &quot;^16.13.1&quot;,
      &quot;webpack&quot;: &quot;^4.43.0&quot;,
      &quot;webpack-cli&quot;: &quot;^3.3.12&quot;,
      &quot;webpack-dev-server&quot;: &quot;^3.11.0&quot;
    },
    &quot;dependencies&quot;: {}
  }
  </code></pre>
  <p><a href="https://github.com/ertanhasani/react-stars/blob/master/webpack.production.config.js" rel="nofollow noreferrer">Here's my old webpack.production.config.js</a></p>
  <p>Here's the updated <code>webpack.production.config.js</code>:</p>
  <pre><code>'use strict';
  
  var webpack = require('webpack')
  
  module.exports = {
  
    entry: ['./example/index.js'],
  
    output: {
      filename: './example/bundle.js',
      pathinfo: true
    },
  
    module: {
      rules: [{
        loader: 'babel-loader',
        test: /\.js$/,
        exclude: /node_modules/,
        query: {
          cacheDirectory: true,
          presets: ['@babel/react', '@babel/preset-env']
        }
      }]
    },
  
    plugins: [
      new webpack.DefinePlugin({
        'process.env': {
          'NODE_ENV': JSON.stringify('production')
        }
      })
    ],
  
    optimization: {
      minimize: false
    }
  };
  
  </code></pre>
  <p><a href="https://github.com/ertanhasani/react-stars/blob/master/webpack.config.js" rel="nofollow noreferrer">Here's my old <code>webpack.config.js</code></a></p>
  <p>my updated <code>webpack.config.js</code>:</p>
  <pre><code>'use strict';
  
  module.exports = {
  
    entry: ['./example/index.js'],
  
    debug: true,
  
    devtool: 'inline-source-map',
  
    output: {
      filename: './example/bundle.js',
      pathinfo: true
    },
  
    module: {
      loaders: [{
        loader: 'babel-loader',
        test: /\.js$/,
        exclude: /node_modules/,
        query: {
          cacheDirectory: true,
          presets: ['@babel/react', '@babel/preset-env']
        }
      }]
    }
  
  };
  </code></pre>
  <p>I also updated `.babelrc. file:</p>
  <p><a href="https://github.com/ertanhasani/react-stars/blob/master/.babelrc" rel="nofollow noreferrer">Here's my old <code>.babelrc</code> file!</a></p>
  <p>my updated <code>.babelrc</code> file:</p>
  <pre><code>{
    &quot;presets&quot;: [&quot;@babel/preset-env&quot;, &quot;@babel/react&quot;],
    &quot;plugins&quot;: [
      &quot;@babel/plugin-transform-object-assign&quot;
    ]
  }
  </code></pre>