title: TypeError: Jest: a transform must export a `process` function
body: <p>Recently upgrading my app to Angular 11. Jest has been set up as the default testing framework. Running npm test results in the following error:</p>
  <pre><code>● Test suite failed to run
  
      TypeError: Jest: a transform must export a `process` function.
  
        20 | @Component({
        21 |     selector: 'app-bx-input-textbox',
      &gt; 22 |     template: require('./bx-input-textbox.component.html'),
           |               ^
        23 |     styles: [String(require('./bx-input-textbox.component.scss'))],
        24 |     providers: [
        25 |         {
  
        at ScriptTransformer._getTransformer (node_modules/@jest/transform/build/ScriptTransformer.js:357:15)
        at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:419:28)
        at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:523:40)
        at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:579:25)
        at src/app/core/components/bx-input-textbox/bx-input-textbox.component.ts:22:15
        at Object.&lt;anonymous&gt; (src/app/core/components/bx-input-textbox/bx-input-textbox.component.ts:38:1)
  </code></pre>
  <p>// jest.config.js</p>
  <pre><code>module.exports = {
    testEnvironment: &quot;jsdom&quot;,
    transform: {
      &quot;.+\\.(css|styl|less|sass|scss)$&quot;: &quot;&lt;rootDir&gt;/node_modules/jest-css-modules-transform&quot;,
      &quot;\\.(ts|js)$&quot;: ['ts-jest']
    },
    setupFilesAfterEnv: ['./jest.setup.js'],
    globals: {    
      &quot;ts-jest&quot;: {
        tsConfig: {
          // allow js in typescript
          allowJs: true,
        },
      },
    },
    // If you need to test a specifc file just include it here
    //testMatch: ['**/repository.jobs.spec.ts'],
    testMatch: []
  };
  </code></pre>
  <p>Package versions
  &quot;@angular-builders/jest&quot;: &quot;12.1.0&quot;,
  &quot;@types/jest&quot;: &quot;24.9.1&quot;,
  &quot;ts-jest&quot;: &quot;26.0.0&quot;,
  &quot;jest&quot;: &quot;24.9.0&quot;,</p>
  <p>I have tried different configurations with the jest.config.js file but not able to resolve this error. Any pointers to resolve this issue would be helpful.</p>