title: how to prevent typescript from adding imports in compiled files
body: <p>I'm building an electron js app with some js libraries like prismjs.</p>
  <p>I tried adding @types/prismjs to my node modules and many other ways</p>
  <p>but still typescript tries to import it <code>import {something} from &quot;prismjs&quot;</code> (in generated js file which I don't want it)</p>
  <p>I have seen similar questions in stack overflow but none of them solved my issue.</p>
  <p>app/ts config</p>
  <pre><code>{
      &quot;compilerOptions&quot;: {
          &quot;module&quot;: &quot;ES2020&quot;,
          &quot;target&quot;: &quot;ES2021&quot;,
          &quot;noImplicitAny&quot;: true,
          &quot;removeComments&quot;: true,
          &quot;allowUnreachableCode&quot;: false,
          &quot;strictNullChecks&quot;: true,
          &quot;strict&quot;: true,
          &quot;noImplicitUseStrict&quot;: false,
          &quot;alwaysStrict&quot;: true,
          &quot;allowSyntheticDefaultImports&quot;: true,
          &quot;typeRoots&quot;: [&quot;../node_modules/@types&quot;],
          &quot;sourceMap&quot;: true
      }
  }
  </code></pre>
  <p>app/script.ts</p>
  <pre><code>import { highlightElement } from &quot;prismjs&quot;;
  
  window.addEventListener(&quot;keyup&quot;, ev =&gt; {
      if (ev.key === &quot;F5&quot;) window.location.reload();
  });
  
  const el = document.querySelectorAll(&quot;code&quot;)[1];
  el.onkeyup = () =&gt; {
      highlightElement(el);
  };
  
  </code></pre>
  <p>project structure
  <a href="https://i.stack.imgur.com/Nw4vd.png" rel="nofollow noreferrer">enter image description here</a></p>