Whats the difference when configuring webpack babel-loader vs configuring it within package.json? : <p>Hi please help me understand the differences between setting babel config inside .babelrc vs webpack loader options, vs inserting it in package.json.</p>

<p>For example, Would it make any difference if I put the presets in the webpack babel-loader options vs package.json or a separate .babelrc config file?</p>

<p>In webpack config:             </p>

<pre><code>          {
            test: /\.(js|jsx|mjs)$/,
            loader: require.resolve('babel-loader'),
            options: {
                 "presets": [
                    "react-app"
                  ]
            },
          },
</code></pre>

<p>In package json: </p>

<pre><code>  "babel": {
    "presets": [
      "react-app"
    ]
  },
</code></pre>
