Skip to content

Commit

Permalink
Allow using no content base with --no-content-base flag
Browse files Browse the repository at this point in the history
Fixes #464
  • Loading branch information
SpaceK33z committed Sep 1, 2016
1 parent 4a01611 commit be9efda
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bin/webpack-dev-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ yargs.options({
},
"content-base": {
type: "string",
default: process.cwd(),
describe: "A directory or URL to serve HTML content from.",
group: RESPONSE_GROUP
},
Expand Down Expand Up @@ -188,8 +189,6 @@ function processOptions(wpOpt) {
options.contentBase = {
target: argv["content-base-target"]
};
} else if(!options.contentBase) {
options.contentBase = process.cwd();
}

if(!options.stats) {
Expand Down Expand Up @@ -267,7 +266,7 @@ function processOptions(wpOpt) {
console.log("webpack result is served from " + options.publicPath);
if(Array.isArray(options.contentBase))
console.log("content is served from " + options.contentBase.join(", "));
else
else if (options.contentBase)
console.log("content is served from " + options.contentBase);
if(options.historyApiFallback)
console.log("404s will fallback to %s", options.historyApiFallback.index || "/index.html");
Expand Down

1 comment on commit be9efda

@MoOx
Copy link

@MoOx MoOx commented on be9efda Sep 7, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit definitely bring some regressions. contentBase from webpack.config / devServer section is now completely ignored.

Please sign in to comment.