Skip to content

Commit 5b94506

Browse files
committed
Inline mode is on by default
1 parent 2a80e33 commit 5b94506

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

bin/webpack-dev-server.js

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ yargs.options({
3333
type: "boolean",
3434
describe: "Lazy"
3535
},
36+
"inline": {
37+
type: "boolean",
38+
default: true,
39+
describe: "Inline mode"
40+
},
3641
"stdin": {
3742
type: "boolean",
3843
describe: "close when stdin ends"
@@ -44,6 +49,7 @@ yargs.options({
4449
"info": {
4550
type: "boolean",
4651
group: DISPLAY_GROUP,
52+
default: true,
4753
describe: "Info"
4854
},
4955
"quiet": {
@@ -197,8 +203,8 @@ if(argv["key"])
197203
if(argv["cacert"])
198204
options.cacert = fs.readFileSync(path.resolve(argv["cacert"]));
199205

200-
if(argv["inline"])
201-
options.inline = true;
206+
if(argv["inline"] === false)
207+
options.inline = false;
202208

203209
if(argv["history-api-fallback"])
204210
options.historyApiFallback = true;
@@ -211,7 +217,7 @@ if(argv["open"])
211217

212218
var protocol = options.https ? "https" : "http";
213219

214-
if(options.inline) {
220+
if(options.inline !== false) {
215221
var devClient = [require.resolve("../client/") + "?" + protocol + "://" + (options.public || (options.host + ":" + options.port))];
216222

217223
if(options.hot)
@@ -228,12 +234,13 @@ if(options.inline) {
228234
}
229235

230236
new Server(webpack(wpOpt), options).listen(options.port, options.host, function(err) {
237+
if(err) throw err;
238+
231239
var uri = protocol + "://" + options.host + ":" + options.port + "/";
232-
if(!options.inline)
240+
if(options.inline === false)
233241
uri += "webpack-dev-server/";
234-
235-
if(err) throw err;
236242
console.log(uri);
243+
237244
console.log("webpack result is served from " + options.publicPath);
238245
if(Array.isArray(options.contentBase))
239246
console.log("content is served from " + options.contentBase.join(", "));

0 commit comments

Comments
 (0)