Skip to content

Commit

Permalink
Honor only relative NODE_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
Enoah Netzach authored and EnoahNetzach committed Jan 26, 2017
1 parent d57ebf2 commit 9929017
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/react-scripts/utils/createJestConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
// Note: this file does not exist after ejecting.

const fs = require('fs');
const path = require('path');
const paths = require('../config/paths');

module.exports = (resolve, rootDir, isEjecting) => {
Expand Down Expand Up @@ -38,7 +39,9 @@ module.exports = (resolve, rootDir, isEjecting) => {
transformIgnorePatterns: [
'[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$'
],
moduleDirectories: ['node_modules', process.env.NODE_PATH].filter(dir => dir),
moduleDirectories: ['node_modules', process.env.NODE_PATH]
.filter(dir => dir)
.filter(folder => !path.isAbsolute(folder)),
moduleNameMapper: {
'^react-native$': 'react-native-web'
}
Expand Down

0 comments on commit 9929017

Please sign in to comment.