title: Determine where circular dependency warning in console is coming from
body: <p>When I build my React/TypeScript component library, the Rollup build is reporting a circular dependency:</p>
  <pre class="lang-sh prettyprint-override"><code>yarn run v1.22.10
  $ yarn clean &amp;&amp; rollup -c
  $ rimraf dist
  
  ./src/index.ts → ./dist/index.esm.js, ./dist/index.js...
  (!) Circular dependency
  src/index.ts -&gt; src/components/index.ts -&gt; src/components/Compound/index.ts -&gt; src/components/Compound/Compound.tsx -&gt; src/index.ts
  created ./dist/index.esm.js, ./dist/index.js in 4.3s
  Done in 5.66s.
  </code></pre>
  <p>I'm trying to figure out <em>where</em> that warning is coming from. TypeScript? Rollup?
  After I know this I may be able to configure it so it will actually fail the build.</p>
  <p>I've searched and grepped through my <code>node_modules</code> but can't seem to find the origin of the warning.</p>
  <p><code>rollup.config.js</code>:</p>
  <pre class="lang-js prettyprint-override"><code>import typescript from 'rollup-plugin-typescript2';
  import postcss from 'rollup-plugin-postcss';
  import pkg from './package.json';
  import ts from 'typescript';
  
  export default {
    input: './src/index.ts',
    external: [...Object.keys(pkg.dependencies || {}), ...Object.keys(pkg.peerDependencies || {})],
    output: [
      {
        file: `./dist/${pkg.module}`,
        format: 'es',
        sourcemap: true,
      },
      {
        file: `./dist/${pkg.main}`,
        format: 'cjs',
        sourcemap: true,
      },
    ],
    plugins: [
      postcss(),
      typescript({
        typescript: ts,
        tsconfig: 'tsconfig.json',
        tsconfigDefaults: {
          exclude: [
            '**/*.spec.ts',
            '**/*.test.ts',
            '**/*.stories.ts',
            '**/*.spec.tsx',
            '**/*.test.tsx',
            '**/*.stories.tsx',
            'node_modules',
            'bower_components',
            'jspm_packages',
            'dist',
          ],
          compilerOptions: {
            sourceMap: true,
            declaration: true,
          },
        },
      }),
    ],
  };
  </code></pre>
  <p><code>tsconfig.json</code>:</p>
  <pre class="lang-json prettyprint-override"><code>{
    &quot;compilerOptions&quot;: {
      &quot;allowSyntheticDefaultImports&quot;: true,
      &quot;declaration&quot;: true,
      &quot;esModuleInterop&quot;: true,
      &quot;experimentalDecorators&quot;: true,
      &quot;jsx&quot;: &quot;react&quot;,
      &quot;lib&quot;: [&quot;dom&quot;, &quot;es5&quot;],
      &quot;module&quot;: &quot;esNext&quot;,
      &quot;moduleResolution&quot;: &quot;node&quot;,
      &quot;noImplicitAny&quot;: false,
      &quot;noImplicitReturns&quot;: true,
      &quot;noUnusedLocals&quot;: true,
      &quot;noUnusedParameters&quot;: false,
      &quot;outDir&quot;: &quot;./dist&quot;,
      &quot;pretty&quot;: true,
      &quot;sourceMap&quot;: true,
      &quot;strict&quot;: true,
      &quot;target&quot;: &quot;es5&quot;
    },
    &quot;exclude&quot;: [&quot;node_modules&quot;,],
    &quot;include&quot;: [&quot;./src&quot;]
  }
  </code></pre>
  <p>So, my question is not how to fix the reported circular dependency, but rather, <strong>from where is the circular dependency warning in the console output coming from?</strong></p>
  <p><em>Node v14.18.2, TypeScript 3.9.10, React 16.14.0, Rollup 2.70.0</em></p>