Skip to content

Commit a2ea8af

Browse files
authored
devServer: add proxy, consistent spaces
1 parent f5b6ea1 commit a2ea8af

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

content/configuration/index.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -369,12 +369,15 @@ module.exports = {
369369
// lets you precisely control what bundle information gets displayed
370370
371371
[devServer](/configuration/dev-server): {
372-
contentBase: path.join(__dirname, 'public'), // boolean | string | array, static file location...
373-
compress: true, // gzip
372+
proxy: { // proxy URLs to backend development server
373+
'/api': 'http://localhost:3000'
374+
},
375+
contentBase: path.join(__dirname, 'public'), // boolean | string | array, static file location
376+
compress: true, // enable gzip compression
374377
historyApiFallback: true, // true for index.html upon 404, object for multiple paths
375-
hot: true, // hot module replacement. Depends on HotModuleReplacementPlugin
376-
https: false, //true for self-signed, object for cert authority
377-
noInfo: true // only errors & warns on hot reload
378+
hot: true, // hot module replacement. Depends on HotModuleReplacementPlugin
379+
https: false, // true for self-signed, object for cert authority
380+
noInfo: true, // only errors & warns on hot reload
378381
// ...
379382
},
380383

0 commit comments

Comments
 (0)