title: Need two babel configuration files: how to avoid this duplication with @rollup/plugin-babel?
body: <p>I'll try to explain at my best. My current configuration requires <strong>two slightly different Babel configurations</strong> (using <code>@rollup/plugin-babel</code> here):</p>
  <pre class="lang-js prettyprint-override"><code>import { babel } from '@rollup/plugin-babel';
  
  export default [
    {
      input: 'src/index.ts',
      output: {
        file: 'dist/index.esm.js',
        format: 'es',
      },
      plugins: [
        /* my plugins */
      ]
    }
    {
      input: 'src/index.ts',
      output: {
        file: 'dist/index.umd.js',
        format: 'umd',
        name: 'MyAwesomeExport',
      },
      plugins: [
        /* my plugins */
      ],
    }
  ];
  </code></pre>
  <p>So... having a <code>.babelrc</code> global file is not an option. I'd love two, but it seems there is no way to &quot;override&quot; the configuration in the plugin itself.</p>
  <p>Of course <strong>I could repeat the <code>plugins</code> array</strong> for both entries... or extract it in a variable, but seems not good to me:</p>
  <pre class="lang-js prettyprint-override"><code>export default [
    {
      // entry 1
      plugins: [
        babel(/* config for entry 1 */),
        /* other plugins */
      ]
    }
    {
      // entry 2
      plugins: [
        babel(/* config for entry 2 */),
        /* repeat the same plugins again */
      ],
    }
  ];
  </code></pre>
  <p>Is there any way I cant set <strong>just one input, two outputs and a specific plugin configuration for just one output?</strong></p>
  <pre class="lang-js prettyprint-override"><code>export default {
      input: 'src/index.ts',
      output: [
          {
              file: 'dist/index.esm.js',
              format: 'es',
          },
          {
              file: 'dist/index.umd.js',
              format: 'umd',
              name: 'TestController'
          }
      ]
  }
  </code></pre>
  <p>Full babel plugin config is:</p>
  
  <pre><code>babel({
      extensions: ['.ts'],
      babelHelpers: 'bundled',
      presets: [
          [&quot;@babel/preset-env&quot;, {
              &quot;targets&quot;: &quot;defaults&quot;
          }],
          &quot;@babel/typescript&quot;,
      ]
  })
  </code></pre>