title: can't transform a folder inside node_modules with ts-jest
body: <p>I'm writing tests in typescript, and i've got private dependencies in <code>node_modules/@my-modules</code> folder. I'm using <code>ts-jest</code> compiler and jest still complains about esnext modules in node_modules folder.</p>
  
  <p>package versions:</p>
  
  <pre><code>"@types/jest": "^23.3.12",
  "jest": "^23.6.0",
  "ts-jest": "^23.10.5",
  </code></pre>
  
  <p>tsconfig.json:</p>
  
  <pre><code>{
    "compilerOptions": {
      "baseUrl": "./src",
      "outDir": "build/dist",
      "module": "commonjs",
      "target": "es5",
      "lib": ["es5", "es6", "dom", "esnext"],
      "sourceMap": true,
      "allowJs": true,
      "jsx": "react",
      "moduleResolution": "node",
      "rootDir": "src",
      "forceConsistentCasingInFileNames": true,
      "noImplicitReturns": true,
      "noImplicitThis": true,
      "noImplicitAny": false,
      "strict": false,
      "strictNullChecks": true,
      "suppressImplicitAnyIndexErrors": true,
      "noUnusedLocals": true,
      "allowSyntheticDefaultImports": true,
      "esModuleInterop": true
    }
  }
  </code></pre>
  
  <p>jest.config.js:</p>
  
  <pre><code>module.exports = {
    globals: {
      "ts-jest": {
        diagnostics: true,
        tsConfig: "&lt;rootDir&gt;/tsconfig.json",
      },
    },
    moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json"],
    preset: "ts-jest",
    roots: ["&lt;rootDir&gt;/src/"],
    setupTestFrameworkScriptFile: "&lt;rootDir&gt;/src/setupEnzyme.ts",
    snapshotSerializers: ["enzyme-to-json/serializer"],
    testEnvironment: "jest-environment-jsdom",
    transformIgnorePatterns: [
      "node_modules/(?!(@my-modules)/)",
    ]
  };
  </code></pre>
  
  <p>exact error when running jest:</p>
  
  <pre><code> Details:
  
      /sites/frontend/node_modules/@my-modules/ui-components/.dist/src/index.js:1
      ({"Object.&lt;anonymous&gt;":function(module,exports,require,__dirname,__filename,global,jest){export { default as Calendar } from './components/calendar';
                                                                                               ^^^^^^
  
      SyntaxError: Unexpected token export
  
  </code></pre>
  
  <p>What is the proper way to transpile files in <code>@my-modules</code> for jest?</p>