title: Jest: SVG require causes "SyntaxError: Unexpected token <"
body: <p>Not sure where to look for this error.</p>
  
  <p>Using Typescript with React, and Jest and Enzyme for unit testing.</p>
  
  <p>Package.json sample:</p>
  
  <pre><code>"scripts": {
      "start": "node server.js",
      "bundle": "cross-env NODE_ENV=production webpack -p",
      "test": "jest"
    },
    "jest": {
      "transform": {
        "^.+\\.tsx?$": "&lt;rootDir&gt;/node_modules/ts-jest/preprocessor.js"
      },
      "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$",
      "moduleFileExtensions": [
        "ts",
        "tsx",
        "js",
        "json"
      ]
    }
  </code></pre>
  
  <p>Running npm test results in:</p>
  
  <pre><code>FAIL src/components/Component.test.tsx
  
   ({"Object.&lt;anonymous&gt;":function(module,exports,require,__dirname,__filename,global,jest){&lt;?xml version="1.0" encoding="UTF-8"?&gt;
                                                                                               ^
  
      SyntaxError: Unexpected token &lt;
  </code></pre>
  
  <p>Edit: It appears to be happening the first place where i use <code>require</code> to load a static <code>.svg</code> file. Why can it not handle that? Is there a way to ignore throwing this error when using require? </p>