mirror of https://github.com/status-im/metro.git
Add option for disabling global hot key usage
Reviewed By: mjesun Differential Revision: D6008860 fbshipit-source-id: 604059e2f2b738e6df2c756f3cdc62981544de64
This commit is contained in:
parent
9f8d4ad4fe
commit
a60ba098c5
|
@ -85,6 +85,7 @@ Given a set of options that you would typically pass to a server, plus a set of
|
|||
* `enableBabelRCLookup (boolean)`: True if `.babelrc` files coming from other Node modules have to be looked up or not (i.e. if their transforms have to be applied to the files contained within the module).
|
||||
* `getPolyfills ((platform) => Array<string>)`: Method that returns a list of paths to polyfills to be added to the bundle. The platform (if provided) will be passed as the only argument of the method. Polyfills are guaranteed to be loaded before any code, and in the provided order in the array.
|
||||
* `getTransformOptions ((mainModuleName, options, getDependenciesOf) => Promise<Array<string>>)`:
|
||||
* `getUseGlobalHotkey (() => boolean)`: Method that returns whether the global hotkey should be used or not. Useful especially on Linux servers.
|
||||
* `maxWorkers (number)`: Maximum amount of workers to use when transforming and bundling. By default it uses an amount computed using the available cores of the processor (approximately 50% of them).
|
||||
* `platforms (Array<string>)`: Array of platforms supported. Currently you can pass `'ios'` and `'android'` there. This information will be used for bundle generation (both the code included and the format to be served).
|
||||
* `postProcessModules ((modules, entryPoints) => Array<Module>)`: Allows to post process the list of modules, either by adding, removing or modifying the existing ones.
|
||||
|
|
|
@ -95,6 +95,8 @@ export type ConfigT = {
|
|||
*/
|
||||
getPolyfills: ({platform: ?string}) => $ReadOnlyArray<string>,
|
||||
|
||||
getUseGlobalHotkey: () => boolean,
|
||||
|
||||
/**
|
||||
* An optional function that can modify the code and source map of bundle
|
||||
* after the minifaction took place. (Function applied per module).
|
||||
|
@ -154,6 +156,7 @@ const DEFAULT = ({
|
|||
getTransformModulePath: () => require.resolve('./transformer.js'),
|
||||
getTransformOptions: async () => ({}),
|
||||
getPolyfills: () => [],
|
||||
getUseGlobalHotkey: () => true,
|
||||
postMinifyProcess: x => x,
|
||||
postProcessModules: modules => modules,
|
||||
postProcessModulesForBuck: modules => modules,
|
||||
|
|
Loading…
Reference in New Issue