diff --git a/local-cli/bundle/buildBundle.js b/local-cli/bundle/buildBundle.js index b65a632cd..829dc5971 100644 --- a/local-cli/bundle/buildBundle.js +++ b/local-cli/bundle/buildBundle.js @@ -49,7 +49,7 @@ function buildBundle(args, config, output = outputBundle, packagerInstance) { projectRoots: config.getProjectRoots(), assetExts: defaultAssetExts.concat(assetExts), assetRoots: config.getAssetRoots(), - blacklistRE: config.getBlacklistRE(args.platform), + blacklistRE: config.getBlacklistRE(), getTransformOptionsModulePath: config.getTransformOptionsModulePath, transformModulePath: transformModulePath, extraNodeModules: config.extraNodeModules, diff --git a/local-cli/default.config.js b/local-cli/default.config.js index b9757e9aa..3e5dbcdc6 100644 --- a/local-cli/default.config.js +++ b/local-cli/default.config.js @@ -1,4 +1,12 @@ -'use strict'; +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + 'use strict'; var blacklist = require('../packager/blacklist'); var path = require('path'); @@ -41,8 +49,8 @@ var config = { * Returns a regular expression for modules that should be ignored by the * packager on a given platform. */ - getBlacklistRE(platform) { - return blacklist(platform); + getBlacklistRE() { + return blacklist(); }, /** diff --git a/local-cli/dependencies/dependencies.js b/local-cli/dependencies/dependencies.js index 7dfecee53..43329462e 100644 --- a/local-cli/dependencies/dependencies.js +++ b/local-cli/dependencies/dependencies.js @@ -26,7 +26,7 @@ function dependencies(argv, config, args, packagerInstance) { const packageOpts = { projectRoots: config.getProjectRoots(), assetRoots: config.getAssetRoots(), - blacklistRE: config.getBlacklistRE(args.platform), + blacklistRE: config.getBlacklistRE(), getTransformOptionsModulePath: config.getTransformOptionsModulePath, transformModulePath: transformModulePath, extraNodeModules: config.extraNodeModules, diff --git a/packager/blacklist.js b/packager/blacklist.js index 3b222145c..d9a357d67 100644 --- a/packager/blacklist.js +++ b/packager/blacklist.js @@ -23,29 +23,6 @@ var sharedBlacklist = [ 'Libraries/Relay/relay/tools/relayUnstableBatchedUpdates.js', ]; -var platformBlacklists = { - web: [ - '.ios.js', - '.android.js', - '.windows.js' - ], - ios: [ - '.web.js', - '.android.js', - '.windows.js', - ], - android: [ - '.web.js', - '.ios.js', - '.windows.js' - ], - windows: [ - '.web.js', - '.ios.js', - '.android.js' - ], -}; - function escapeRegExp(pattern) { if (Object.prototype.toString.call(pattern) === '[object RegExp]') { return pattern.source.replace(/\//g, path.sep); @@ -58,10 +35,9 @@ function escapeRegExp(pattern) { } } -function blacklist(platform, additionalBlacklist) { +function blacklist(additionalBlacklist) { return new RegExp('(' + (additionalBlacklist || []).concat(sharedBlacklist) - .concat(platformBlacklists[platform] || []) .map(escapeRegExp) .join('|') + ')$' diff --git a/packager/rn-cli.config.js b/packager/rn-cli.config.js index 72a785ef2..c7741dfbc 100644 --- a/packager/rn-cli.config.js +++ b/packager/rn-cli.config.js @@ -1,6 +1,11 @@ -// Copyright 2004-present Facebook. All Rights Reserved. - /** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * * React Native CLI configuration file */ 'use strict'; @@ -21,8 +26,8 @@ module.exports = { return []; }, - getBlacklistRE(platform) { - return blacklist(platform); + getBlacklistRE() { + return blacklist(); }, _getRoots() {