From c6b2186a8a5566691594b58bc21bcf89022844b8 Mon Sep 17 00:00:00 2001 From: Vincent Riemer Date: Wed, 25 Jul 2018 11:01:44 -0400 Subject: [PATCH] Whitelist react-native-dom in haste/cli configs --- jest/hasteImpl.js | 3 ++- local-cli/core/index.js | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/jest/hasteImpl.js b/jest/hasteImpl.js index 8f02881c51bfa5..030beeb9ea611a 100644 --- a/jest/hasteImpl.js +++ b/jest/hasteImpl.js @@ -15,6 +15,7 @@ const path = require('path'); const ROOTS = [ path.resolve(__dirname, '..') + path.sep, path.resolve(__dirname, '../../react-native-windows') + path.sep, + path.resolve(__dirname, '../../react-native-dom') + path.sep, ]; const BLACKLISTED_PATTERNS /*: Array */ = [ @@ -36,7 +37,7 @@ const NAME_REDUCERS /*: Array<[RegExp, string]> */ = [ // strip .js/.js.flow suffix [/^(.*)\.js(\.flow)?$/, '$1'], // strip .android/.ios/.native/.web suffix - [/^(.*)\.(android|ios|native|web|windows)$/, '$1'], + [/^(.*)\.(android|ios|native|web|windows|dom)$/, '$1'], ]; const haste = { diff --git a/local-cli/core/index.js b/local-cli/core/index.js index 3756fc3eeec0b6..95028f0ea5bd72 100644 --- a/local-cli/core/index.js +++ b/local-cli/core/index.js @@ -70,11 +70,11 @@ const defaultConfig = { hasteImplModulePath: require.resolve('../../jest/hasteImpl'), getPlatforms(): Array { - return ['ios', 'android', 'windows', 'web']; + return ['ios', 'android', 'windows', 'web', 'dom']; }, getProvidesModuleNodeModules(): Array { - return ['react-native', 'react-native-windows']; + return ['react-native', 'react-native-windows', 'react-native-dom']; }, };