mirror of https://github.com/status-im/metro.git
Expose type parameter on the buildGraph command
Reviewed By: davidaurelio Differential Revision: D7654256 fbshipit-source-id: c3d97a1564ed06561b071ca412b14655f46cbc4f
This commit is contained in:
parent
47793c25a5
commit
310c096671
|
@ -281,6 +281,7 @@ type BuildGraphOptions = {|
|
||||||
dev?: boolean,
|
dev?: boolean,
|
||||||
onProgress?: (transformedFileCount: number, totalFileCount: number) => void,
|
onProgress?: (transformedFileCount: number, totalFileCount: number) => void,
|
||||||
platform?: string,
|
platform?: string,
|
||||||
|
type: 'module' | 'script',
|
||||||
|};
|
|};
|
||||||
|
|
||||||
type RunBuildOptions = {|
|
type RunBuildOptions = {|
|
||||||
|
@ -380,6 +381,7 @@ exports.buildGraph = async function({
|
||||||
entries,
|
entries,
|
||||||
onProgress,
|
onProgress,
|
||||||
platform = `web`,
|
platform = `web`,
|
||||||
|
type = 'module',
|
||||||
...rest
|
...rest
|
||||||
}: BuildGraphOptions): Promise<Graph> {
|
}: BuildGraphOptions): Promise<Graph> {
|
||||||
const metroServer = await runMetro({
|
const metroServer = await runMetro({
|
||||||
|
@ -393,6 +395,7 @@ exports.buildGraph = async function({
|
||||||
dev,
|
dev,
|
||||||
onProgress,
|
onProgress,
|
||||||
platform,
|
platform,
|
||||||
|
type,
|
||||||
});
|
});
|
||||||
} finally {
|
} finally {
|
||||||
await metroServer.end();
|
await metroServer.end();
|
||||||
|
|
Loading…
Reference in New Issue