From 144962cb7dc5e7eba275ed1d9a2bcb5be674028a Mon Sep 17 00:00:00 2001 From: David S Price Date: Tue, 28 Jul 2020 19:48:37 -0700 Subject: [PATCH] add dev.js `forward` option --- docs/cliCommands.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/cliCommands.md b/docs/cliCommands.md index 07f98919..92d27ab3 100644 --- a/docs/cliCommands.md +++ b/docs/cliCommands.md @@ -246,9 +246,10 @@ yarn redwood dev [side..] `yarn rw dev api` starts the Redwood dev server and `yarn rw dev web` starts the Webpack dev server with Redwood's config. -| Argument | Description | -| :------- | :-------------------------------------------------------------------------------------- | -| `side` | Which dev server(s) to start. Choices are `api` and `web`. Defaults to `api` and `web` | +| Argument | Description | +| :-------- | :-------------------------------------------------------------------------------------- | +| `side` | Which dev server(s) to start. Choices are `api` and `web`. Defaults to `api` and `web` | +| `--forward, --fwd` | String of one or more [Webpack DevServer](https://webpack.js.org/configuration/dev-server/) config options. See example usage below. | **Usage** @@ -267,6 +268,12 @@ $ /redwood-app/node_modules/.bin/dev-server 15:04:51 api | ► http://localhost:8911/graphql/ ``` +Using `--forward` (alias `--fwd`), you can pass one or more Webpack DevServer config options. The following will run the dev server, set the port to `1234`, and disable automatic browser opening. + +```plaintext{10} +~/redwood-app$ yarn rw dev --fwd="--port=1234 --open=false" +``` + ## destroy (alias d) Rollback changes made by the generate command.