Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cli/src/tools/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function loadConfig(projectRoot: string = process.cwd()): ConfigT {
get assets() {
return findAssets(projectRoot, userConfig.assets);
},
platforms: {},
platforms: userConfig.platforms,
haste: {
providesModuleNodeModules: [],
platforms: [],
Expand Down
12 changes: 11 additions & 1 deletion packages/cli/src/tools/config/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,13 @@ export const dependencyConfig = t
projectConfig: t.func(),
linkConfig: t.func(),
}),
).default(),
).default({}),
commands: t
.array()
.items(command)
.default([]),
})
.unknown(true)
.default();

/**
Expand Down Expand Up @@ -170,5 +171,14 @@ export const projectConfig = t
.array()
.items(command)
.default([]),
platforms: map(
t.string(),
t.object({
dependencyConfig: t.func(),
projectConfig: t.func(),
linkConfig: t.func(),
}),
).default({}),
})
.unknown(true)
.default();
4 changes: 2 additions & 2 deletions types/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,10 @@ export type UserDependencyConfigT = {
*/
export type UserConfigT = {
/**
* Shares some structure with ConfigT, except that haste, root, platforms
* Shares some structure with ConfigT, except that haste and root
* are calculated and can't be defined
*/
...$Diff<ConfigT, {haste: any, root: any, platforms: any}>,
...$Diff<ConfigT, {haste: any, root: any}>,
reactNativePath: ?string,

// Additional project settings
Expand Down