You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/Server.js
+1-13Lines changed: 1 addition & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -211,18 +211,6 @@ function Server(compiler, options) {
211
211
contentBase.forEach(function(item){
212
212
app.get("*",serveIndex(item));
213
213
});
214
-
}elseif(typeofcontentBase==="object"){
215
-
console.log('Using contentBase as a proxy is deprecated and will be removed in the next major version. Please use the proxy option instead.\n\nTo update remove the contentBase option from webpack.config.js and add this:');
216
-
console.log('proxy: {\n\t"*": <your current contentBase configuration>\n}');
217
-
// Proxy every request to contentBase.target
218
-
app.all("*",function(req,res){
219
-
proxy.web(req,res,contentBase,function(err){
220
-
varmsg="cannot proxy to "+contentBase.target+" ("+err.message+")";
221
-
this.sockWrite(this.sockets,"proxy-error",[msg]);
222
-
res.statusCode=502;
223
-
res.end();
224
-
}.bind(this));
225
-
}.bind(this));
226
214
}elseif(/^(https?:)?\/\//.test(contentBase)){
227
215
// Redirect every request to contentBase
228
216
app.get("*",function(req,res){
@@ -244,7 +232,7 @@ function Server(compiler, options) {
0 commit comments