mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Move Array<string> to $ReadOnlyArray<string>. Separate polyfill list into a file.
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
This commit is contained in:
committed by
Facebook Github Bot
parent
cad2d9b072
commit
6dd9d16833
@@ -152,12 +152,12 @@ function getPackagerServer(args, config) {
|
||||
blacklistRE: config.getBlacklistRE(),
|
||||
cacheVersion: '3',
|
||||
extraNodeModules: config.extraNodeModules,
|
||||
getPolyfills: config.getPolyfills,
|
||||
getTransformOptions: config.getTransformOptions,
|
||||
hasteImpl: config.hasteImpl,
|
||||
maxWorkers: args.maxWorkers,
|
||||
platforms: defaultPlatforms.concat(args.platforms),
|
||||
polyfillModuleNames: config.getPolyfillModuleNames(),
|
||||
getPolyfills: config.getPolyfills,
|
||||
postMinifyProcess: config.postMinifyProcess,
|
||||
postProcessModules: config.postProcessModules,
|
||||
projectRoots: args.projectRoots,
|
||||
|
||||
Reference in New Issue
Block a user