mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Break out defaults, add flow for Config
Summary: In order to make `Config` and defaults available to our new code, I’ve added flow types and put default values into one shared modile Reviewed By: cpojer Differential Revision: D4044600 fbshipit-source-id: 875ed3ade69c5b22bb3c1b177e7bad732834d476
This commit is contained in:
committed by
Facebook Github Bot
parent
254b1ec6b3
commit
d7aa297762
49
packager/defaults.js
Normal file
49
packager/defaults.js
Normal file
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @flow
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
exports.assetExts = [
|
||||
'bmp', 'gif', 'jpg', 'jpeg', 'png', 'psd', 'svg', 'webp', // Image formats
|
||||
'm4v', 'mov', 'mp4', 'mpeg', 'mpg', 'webm', // Video formats
|
||||
'aac', 'aiff', 'caf', 'm4a', 'mp3', 'wav', // Audio formats
|
||||
'html', 'pdf', // Document formats
|
||||
];
|
||||
|
||||
exports.moduleSystem = require.resolve('./react-packager/src/Resolver/polyfills/require.js');
|
||||
|
||||
exports.platforms = ['ios', 'android', 'windows', 'web'];
|
||||
|
||||
exports.polyfills = [
|
||||
require.resolve('./react-packager/src/Resolver/polyfills/polyfills.js'),
|
||||
require.resolve('./react-packager/src/Resolver/polyfills/console.js'),
|
||||
require.resolve('./react-packager/src/Resolver/polyfills/error-guard.js'),
|
||||
require.resolve('./react-packager/src/Resolver/polyfills/Number.es6.js'),
|
||||
require.resolve('./react-packager/src/Resolver/polyfills/String.prototype.es6.js'),
|
||||
require.resolve('./react-packager/src/Resolver/polyfills/Array.prototype.es6.js'),
|
||||
require.resolve('./react-packager/src/Resolver/polyfills/Array.es6.js'),
|
||||
require.resolve('./react-packager/src/Resolver/polyfills/Object.es7.js'),
|
||||
require.resolve('./react-packager/src/Resolver/polyfills/babelHelpers.js'),
|
||||
];
|
||||
|
||||
exports.providesModuleNodeModules = [
|
||||
'react-native',
|
||||
'react-native-windows',
|
||||
// Parse requires AsyncStorage. They will
|
||||
// change that to require('react-native') which
|
||||
// should work after this release and we can
|
||||
// remove it from here.
|
||||
'parse',
|
||||
];
|
||||
|
||||
exports.runBeforeMainModule = [
|
||||
// Ensures essential globals are available and are patched correctly.
|
||||
'InitializeCore',
|
||||
];
|
||||
Reference in New Issue
Block a user