title: Rollup Exceptions to preserveModules
body: <p>I use a rollup plugin called <code>rollup-plugin-lit-css</code> to transform <code>.css</code> files into javascript modules. That plugin isdead-simple, it essentially just appends <code>export default</code> to the file.</p>
  
  <p>My rollup config uses <code>preserveModules</code> and <code>output.dir</code> to avoid bundling modules.</p>
  
  <pre><code>import resolve from 'rollup-plugin-node-resolve';
  import litcss from 'rollup-plugin-lit-css';
  import babel from 'rollup-plugin-babel';
  import commonjs from 'rollup-plugin-commonjs';
  
  export default {
    preserveModules: true,
    input: 'src/a.js',
    output: {
      dir: 'dist',
      format: 'es',
    },
    plugins: [
      litcss(),
      babel({ babelrc: true }),
      resolve({ browser: true }),
      commonjs(),
    ],
  };
  </code></pre>
  
  <h2>Current Behavior</h2>
  
  <p>Let's say that <code>a</code> imports <code>a.css</code> and also <code>b</code>. The current situation turns this:</p>
  
  <pre><code>src/
  ├── a.js
  ├── a.css
  ├── b.js
  </code></pre>
  
  <p>into this:</p>
  
  <pre><code>dist/
  ├── a.js
  ├── a.css
  ├── b.js
  </code></pre>
  
  <h2>Desired Output</h2>
  
  <p>I would like, instead, to get this:</p>
  
  <pre><code>dist/
  ├── a.js
  ├── b.js
  </code></pre>
  
  <p>With the transformed contents of <code>a.css</code> bundled into <code>a.js</code></p>