title: create-react-app --typescript: Cannot compile namespaces when the '--isolatedModules' flag is provided
body: <p>I generated a project with <code>npx create-react-app my-app-ts --typescript</code>,<br>
  then I created two files, <code>sw-build.js</code> and <code>sw.js</code> under <code>src/</code>,   </p>
  
  <p>the code of <code>sw-build.js</code> and <code>sw.js</code> is from (<a href="https://github.com/facebook/create-react-app/issues/5673#issuecomment-438654051" rel="nofollow noreferrer">Guidlines for Using Workbox</a>).</p>
  
  <p>There is an error:</p>
  
  <pre><code>Cannot compile namespaces when the '--isolatedModules' flag is provided.
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/BsRsl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BsRsl.png" alt="enter image description here"></a></p>
  
  <p>What should I do?</p>