title: resolve modules in testcafe typescript tests
body: <p>I encountered the module resolving issue in my testcafe(1.17.1) test.
  I have a test</p>
  <pre><code>//test.e2e.ts in &lt;root&gt;/tests folder
  import {MyComponent} from '../src/MyComponent';
  ...
  ...
  fixture('Custom domain tests');
  
  test('test 1', async () =&gt; {
    ...
    ...
  });
  </code></pre>
  <p>the <code>&lt;root&gt;/src/MyComponent.tsx</code> looks like this</p>
  <pre><code>//MyComponent.tsx in &lt;root&gt;/src folder
  import React, { FunctionComponent } from 'react';
  import styles from '../scss/MyComponent.module.scss';
  
  export const MyComponent: FunctionComponent = () =&gt; {
    ...
    ...
  }
  </code></pre>
  <p>When I run <code>testcafe ./tests/test.e2e.ts</code>, I always got the error
  <code>Error: TypeScript compilation failed. Cannot find module '../scss/MyComponent.module.scss' or its corresponding type declarations. </code>
  My testcafe tsconfig specified the path config, the <code>&lt;root&gt;/scss-module-for-tests.ts</code> just exports a empty string</p>
  <pre><code>// .testcaferc.json in &lt;root&gt;/
  {
    &quot;compilerOptions&quot;: {
      &quot;typescript&quot;: {
        &quot;options&quot;: {
          &quot;esModuleInterop&quot;: true,
          &quot;baseUrl&quot;: &quot;.&quot;,
          &quot;paths&quot;: {
            &quot;../scss/MyComponent.module.scss&quot;: [&quot;scss-module-for-tests.ts&quot;],
            &quot;*.scss&quot;: [&quot;scss-module-for-tests.ts&quot;]
          }
        }
      }
    }
  }
  </code></pre>
  <p>However, seems typescript path config doesn't resolve relative path nor accept a regex, but My project has a lot of those <code>../scss/*module.scss</code> imports. Is there anyway to resolve the scss file directly for testcafe?</p>
  <p>Thanks in advance!</p>
  <p>Update on 12/02/2021
  I tried add compiler for testcafe according to this <a href="https://testcafe.io/documentation/402638/reference/configuration-file#compileroptions" rel="nofollow noreferrer">doc</a> , I put a <code>.testcaferc.json</code> at the root folder</p>
  <pre><code>//.testcaferc.json at &lt;root&gt;
  {
    &quot;compilerOptions&quot;: {
      &quot;typescript&quot;: {
        &quot;options&quot;: {
          &quot;esModuleInterop&quot;: &quot;true&quot;
        }
      }
    }
  }
  </code></pre>
  <p>But seems the <code>esModuleInterop=true</code> config didn't reach to testcafe.</p>
  <p>Update 12/13/2021:
  Not easy to configure it correctly, I removed the <code>*.scss</code> file reference in the test code. Problem solved.</p>