1 | // @remove-on-eject-begin
|
2 | /**
|
3 | * Copyright (c) 2015-present, Facebook, Inc.
|
4 | * All rights reserved.
|
5 | *
|
6 | * This source code is licensed under the BSD-style license found in the
|
7 | * LICENSE file in the root directory of this source tree. An additional grant
|
8 | * of patent rights can be found in the PATENTS file in the same directory.
|
9 | */
|
10 | // @remove-on-eject-end
|
11 |
|
12 | if (typeof Promise === 'undefined') {
|
13 | // Rejection tracking prevents a common issue where React gets into an
|
14 | // inconsistent state due to an error, but it gets swallowed by a Promise,
|
15 | // and the user has no idea what causes React's erratic future behavior.
|
16 | require('promise/lib/rejection-tracking').enable();
|
17 | window.Promise = require('promise/lib/es6-extensions.js');
|
18 | }
|
19 |
|
20 | // fetch() polyfill for making API calls.
|
21 | require('whatwg-fetch');
|
22 |
|
23 | // Object.assign() is commonly used with React.
|
24 | // It will use the native implementation if it's present and isn't buggy.
|
25 | Object.assign = require('object-assign');
|