title: How to get rid of the "@rollup/plugin-typescript: Rollup 'sourcemap' option must be set to generate source maps." warning?
body: <p>I get this warning every time I build for production. When I build for production I disable source maps in the rollup output config.</p>
  <pre class="lang-json prettyprint-override"><code>output: [{ dir: &quot;...&quot;, format: &quot;...&quot;, sourcemap: isProd ? false : true }]
  </code></pre>
  <p>I use the same tsconfig for dev and production, <code>tsconfig.json</code>:</p>
  <pre class="lang-json prettyprint-override"><code>    {
        &quot;compilerOptions&quot;: {
          // Output
          &quot;target&quot;: &quot;ESNext&quot;,
          &quot;module&quot;: &quot;ESNEXT&quot;,
          &quot;sourceMap&quot;: true,
          &quot;jsx&quot;: &quot;react&quot;,
          &quot;noEmit&quot;: true,
          // Compile time code checking
          &quot;strict&quot;: true,
          // Libraries
          &quot;lib&quot;: [&quot;dom&quot;, &quot;esnext&quot;],
          // Imports
          &quot;moduleResolution&quot;: &quot;node&quot;,
          &quot;allowSyntheticDefaultImports&quot;: true,
          &quot;esModuleInterop&quot;: true
        },
        &quot;exclude&quot;: [&quot;dist&quot;, &quot;app&quot;]
      }
  </code></pre>
  <p>I understand that this is the reason for the warning from looking at the rollup plugin source code:</p>
  <pre class="lang-js prettyprint-override"><code>    /**
       * Validate that the `compilerOptions.sourceMap` option matches `outputOptions.sourcemap`.
       * @param context Rollup plugin context used to emit warnings.
       * @param compilerOptions Typescript compiler options.
       * @param outputOptions Rollup output options.
       * @param autoSetSourceMap True if the `compilerOptions.sourceMap` property was set to `true`
       * by the plugin, not the user.
       */
      function validateSourceMap(context, compilerOptions, outputOptions, autoSetSourceMap) {
          if (compilerOptions.sourceMap &amp;&amp; !outputOptions.sourcemap &amp;&amp; !autoSetSourceMap) {
              context.warn(`@rollup/plugin-typescript: Rollup 'sourcemap' option must be set to generate source maps.`);
          }
          else if (!compilerOptions.sourceMap &amp;&amp; outputOptions.sourcemap) {
              context.warn(`@rollup/plugin-typescript: Typescript 'sourceMap' compiler option must be set to generate source maps.`);
          }
      }
  </code></pre>
  <p>But I would prefer to not add the complexity of one tsconfig for dev and another for production.</p>
  <p>What would be a good way to get rid of this warning?</p>