You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
Adds the `waitForBundler` option to `runServer()` and `runMetro()`. If set to `true`, this option causes Metro to fully initialise the bundler (crawling the filesystem, creating the transformer, etc) before setting up the HTTP server. If `false` (the default), the HTTP server and bundler are initialised in parallel, which means the first bundle request might need to wait for initialisation to finish.
This option is primarily useful for "prewarming" the bundler (in particular the dependency graph / Haste map) by programmatically creating a short-lived server instance.
Reviewed By: feedthejim
Differential Revision: D31354827
fbshipit-source-id: c24ae44c7724a5849eac9a92dab592915a99c4d3
Copy file name to clipboardexpand all lines: docs/GettingStarted.md
+1
Original file line number
Diff line number
Diff line change
@@ -87,6 +87,7 @@ We recommend using `runMetro` instead of `runServer`, `runMetro` calls this func
87
87
*`secureKey (string)`: **DEPRECATED** The key to use for `https` when `secure` is on.
88
88
*`secureCert (string)`: **DEPRECATED** The cert to use for `https` when `secure` is on.
89
89
*`secureServerOptions (Object)`: The options object to pass to the Metro's https server. The presence of this object will make Metro's server run on `https`. Refer to the [nodejs docs](https://nodejs.org/api/https.html#https_https_createserver_options_requestlistener) for valid options.
90
+
*`waitForBundler (boolean)`: Whether to wait for the bundler to finish initializing before returning the server instance.
0 commit comments