docs: Fix links to Webpack docs (#34326)
The previous link, https://webpack.js.org/configuration/dev-server/#devserver-proxy, doesn't go directly to the proxy section. PR Close #34326
This commit is contained in:
parent
419b153b17
commit
8683c0335b
|
@ -325,7 +325,7 @@ For more information, see [Autoprefixer documentation](https://autoprefixer.gith
|
||||||
|
|
||||||
## Proxying to a backend server
|
## Proxying to a backend server
|
||||||
|
|
||||||
You can use the [proxying support](https://webpack.js.org/configuration/dev-server/#devserver-proxy) in the `webpack` dev server to divert certain URLs to a backend server, by passing a file to the `--proxy-config` build option.
|
You can use the [proxying support](https://webpack.js.org/configuration/dev-server/#devserverproxy) in the `webpack` dev server to divert certain URLs to a backend server, by passing a file to the `--proxy-config` build option.
|
||||||
For example, to divert all calls for `http://localhost:4200/api` to a server running on `http://localhost:3000/api`, take the following steps.
|
For example, to divert all calls for `http://localhost:4200/api` to a server running on `http://localhost:3000/api`, take the following steps.
|
||||||
|
|
||||||
1. Create a file `proxy.conf.json` in your project's `src/` folder.
|
1. Create a file `proxy.conf.json` in your project's `src/` folder.
|
||||||
|
@ -356,7 +356,7 @@ For example, to divert all calls for `http://localhost:4200/api` to a server run
|
||||||
1. To run the dev server with this proxy configuration, call `ng serve`.
|
1. To run the dev server with this proxy configuration, call `ng serve`.
|
||||||
|
|
||||||
You can edit the proxy configuration file to add configuration options; some examples are given below.
|
You can edit the proxy configuration file to add configuration options; some examples are given below.
|
||||||
For a description of all options, see [webpack DevServer documentation](https://webpack.js.org/configuration/dev-server/#devserver-proxy).
|
For a description of all options, see [webpack DevServer documentation](https://webpack.js.org/configuration/dev-server/#devserverproxy).
|
||||||
|
|
||||||
Note that if you edit the proxy configuration file, you must relaunch the `ng serve` process to make your changes effective.
|
Note that if you edit the proxy configuration file, you must relaunch the `ng serve` process to make your changes effective.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue