Skip to content

Commit 905f7f1

Browse files
authored
fix(docs): Change proxy configuration to array format (#18107)
this is following new configuration params in webpack, previous example threw an error
1 parent c821b03 commit 905f7f1

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

docs/src/pages/quasar-cli-webpack/api-proxying.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,15 @@ To configure the proxy rules, edit the `/quasar.config` file in `devServer.proxy
1212

1313
```js /quasar.config file
1414
devServer: {
15-
proxy: {
15+
proxy: [
1616
// proxy all requests starting with /api to jsonplaceholder
17-
'/api': {
18-
target: 'http://some.api.target.com:7070',
19-
changeOrigin: true,
20-
pathRewrite: {
21-
'^/api': ''
22-
}
17+
{
18+
context: ['/api'],
19+
target: 'http://some.api.target.com:7070',
20+
pathRewrite: { '^/api': '' },
21+
changeOrigin: true
2322
}
24-
}
23+
]
2524
}
2625
```
2726

0 commit comments

Comments
 (0)