title: How to prevent tests being bundled by rollup?
body: <p>I am building a react component package and want to exclude my tests folder from being bundled in my dist file that is built from rollup.</p>
  <p>My file structure looks like this after running <code>rollup -c</code></p>
  <pre><code>.
  ├── dist
  │   ├── index.js
  │   ├── tests
  │      ├── index.test.js
  ├── src
  │   ├── index.tsx
  │   ├── tests
  │      ├── index.test.tsx
  </code></pre>
  <p>My rollup config looks like this:</p>
  <pre><code>import typescript from 'rollup-plugin-typescript2'
  
  import pkg from './package.json'
  
  export default {
    input: 'src/index.tsx',
    output: [
      {
        file: pkg.main,
        format: 'cjs',
        exports: 'named',
        sourcemap: true,
        strict: false
      }
    ],
    plugins: [typescript()],
    external: ['react', 'react-dom', 'prop-types']
  }
  </code></pre>
  <p>How can I exclude my tests directory from being bundled into the <code>dist</code> file when runnning rollup?</p>