Skip to content

Commit 9fca769

Browse files
obladorfacebook-github-bot
authored andcommitted
Fix ignored --projectRoot/watchFolders arguments (#21165)
Summary: Due to Kureev's cleanup in c4a66a8 some arguments are no longer properly passed to metro, but just the default values. This broke the `--projectRoot` and `--watchFolders` arguments used by storybook to change the bundle entrypoint. This PR simply fixes the regression by assigning these values from argv instead of reading config defaults. Related: the undocumented `REACT_NATIVE_APP_ROOT` env var is broken, not sure for how long, but I can fix it as a part of this PR or make a new one. Pull Request resolved: #21165 Differential Revision: D9929642 Pulled By: hramos fbshipit-source-id: 00485a0429bd4301de03e5cb455e928878c4ba8f
1 parent 2191eec commit 9fca769

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

local-cli/server/runServer.js

+2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ async function runServer(args: Args, config: ConfigT) {
5858
config.server.port = args.port;
5959
config.reporter = reporter;
6060
config.resetCache = args.resetCache;
61+
config.projectRoot = args.projectRoot;
62+
config.watchFolders = args.watchFolders.slice(0);
6163
config.server.enhanceMiddleware = middleware =>
6264
middlewareManager.getConnectInstance().use(middleware);
6365

0 commit comments

Comments
 (0)