Permalink
Browse files

Force `'default'` transform variant to be present

Summary: Enforces a `'default'` property to be present on the transform variant mapping. This will allow us to simplify transforms of assets and json to only provide one variant for the new Buck build system.

Reviewed By: jeanlauliac

Differential Revision: D5002052

fbshipit-source-id: 2a7240c1b2450f62de686c46ab2c2e5a75dea399
  • Loading branch information...
davidaurelio authored and facebook-github-bot committed May 4, 2017
1 parent 7876ffe commit 11eef69936fabb455271caa870e7fde17460d954
Showing with 3 additions and 2 deletions.
  1. +2 −1 local-cli/util/Config.js
  2. +1 −1 packager/src/ModuleGraph/types.flow.js
View
@@ -21,6 +21,7 @@ const RN_CLI_CONFIG = 'rn-cli.config.js';
import type {GetTransformOptions, PostMinifyProcess, PostProcessModules} from '../../packager/src/Bundler';
import type {HasteImpl} from '../../packager/src/node-haste/Module';
import type {TransformVariants} from '../../packager/src/ModuleGraph/types.flow';
/**
* Configuration file of the CLI.
@@ -89,7 +90,7 @@ export type ConfigT = {
*/
hasteImpl?: HasteImpl,
transformVariants: () => {[name: string]: Object},
transformVariants: () => TransformVariants,
};
const defaultConfig: ConfigT = {
@@ -123,7 +123,7 @@ export type TransformResult = {|
export type TransformResults = {[string]: TransformResult};
export type TransformVariants = {[key: string]: Object};
export type TransformVariants = {+[name: string]: {}, +default: {}};
export type TransformedCodeFile = {
+code: string,

0 comments on commit 11eef69

Please sign in to comment.