Skip to content

Commit df98c0c

Browse files
committedOct 1, 2018
Update notes about advanced proxy
1 parent b5bae25 commit df98c0c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎packages/react-scripts/template/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -1118,6 +1118,8 @@ We don’t recommend this approach.
11181118
11191119
If the `proxy` option is **not** flexible enough for you, you can get direct access to the Express app instance and hook up your own proxy middleware.
11201120

1121+
You can use this feature in conjunction with the `proxy` property in `package.json`, but it is recommended you consolidate all of your logic into `src/setupTests.js`.
1122+
11211123
First, install `http-proxy-middleware` using npm or Yarn:
11221124

11231125
```bash
@@ -1146,6 +1148,10 @@ module.exports = function(app) {
11461148
};
11471149
```
11481150

1151+
> **Note:** You do not need to import this file anywhere. It is automatically registered when you start the development server.
1152+
1153+
> **Note:** This file only supports Node's JavaScript syntax. Be sure to only use supported language features (i.e. no support for Flow, ES Modules, etc).
1154+
11491155
## Using HTTPS in Development
11501156

11511157
> Note: this feature is available with `react-scripts@0.4.0` and higher.

0 commit comments

Comments
 (0)