title: how to share rollup config files
body: <p>I have 2 rollup config files  which has some common parts and uncommon parts:</p>
  
  <pre><code> // rollup.config.umd.js
    export config {
       external: ['invariant', 'lodash'],
       globals: {
        invariant: 'invariant'
       },
       input: 'src/index.js',
       name: 'my.comp',
       output: {
         file: 'my.comp.umd.js'
         format: 'umd'
       }...
  </code></pre>
  
  <p>and another file</p>
  
  <pre><code> // rollup.config.esm5.js
    export config {
       external: ['invariant', 'lodash'],
       globals: {
        invariant: 'invariant'
       },
       input: 'src/index.js',
       name: 'my.comp',
       output: {
         file: 'my.comp.es5.js'
         format: 'es'
       }...
  </code></pre>
  
  <p>How do I keep these config files DRY ?</p>
  
  <p>Not keeping DRY has following problems e.g. Imagine many external dependencies - if one forgets to add a new dependency in one place we are in trouble.</p>
  
  <p>(I also use some different set of plugins etc and plugin configs but say that is out of scope of this problem.)</p>