mirror of
https://github.com/status-im/react-native.git
synced 2025-02-26 08:05:34 +00:00
Make Module.getName() synchronous
Reviewed By: cpojer Differential Revision: D5911221 fbshipit-source-id: 2381d70008adff9e0f7613fe43c8fb562222acd6
This commit is contained in:
parent
43d394cb4b
commit
ee8aeddc52
@ -67,7 +67,7 @@ type HMROptions<TModule> = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
type Moduleish = {
|
type Moduleish = {
|
||||||
getName(): Promise<string>,
|
getName(): string,
|
||||||
isAsset(): boolean,
|
isAsset(): boolean,
|
||||||
isJSON(): boolean,
|
isJSON(): boolean,
|
||||||
path: string,
|
path: string,
|
||||||
@ -135,7 +135,7 @@ function attachHMRServer<TModule: Moduleish>(
|
|||||||
name?: string,
|
name?: string,
|
||||||
deps: Array<string>,
|
deps: Array<string>,
|
||||||
}> = await Promise.all(response.dependencies.map(async (dep: TModule) => {
|
}> = await Promise.all(response.dependencies.map(async (dep: TModule) => {
|
||||||
const depName = await dep.getName();
|
const depName = dep.getName();
|
||||||
|
|
||||||
if (dep.isAsset() || dep.isJSON()) {
|
if (dep.isAsset() || dep.isJSON()) {
|
||||||
return {path: dep.path, deps: []};
|
return {path: dep.path, deps: []};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user