Summary: Move the returned type of `getPolyfills` from a standard `Array` to a read-only one, so that we make sure the array is not modified once created. Also, refactor the list of polyfills included by default to a generic, central file, then require it both from the CLI utils as well as the development server.
Reviewed By: jeanlauliac
Differential Revision: D5406553
fbshipit-source-id: ab980288bb1c625338de469da77dd6fc70bcedbc
Summary:
The **motivation** for this PR is my sad colleague bestander: I managed to break travis with bd60d828c5, without considering the consequences. This PR solves this failure, and will fix it for good.
**Test plan (required)**
Travis will demonstrate that the code is solid.
Let’s make sure tests pass on both Travis and Circle CI.
Closes https://github.com/facebook/react-native/pull/8576
Differential Revision: D3516652
Pulled By: bestander
fbshipit-source-id: 09bb488517a0ee2b5b6219dfda559aef568bbbc2