Skip to content

Commit ad6d8c7

Browse files
Update devServer.options to take an array as well as a string to make it consistent with the underlying library, open
https://www.npmjs.com/package/open
1 parent 99e8db0 commit ad6d8c7

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

lib/options.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,12 @@
198198
},
199199
{
200200
"type": "boolean"
201+
},
202+
{
203+
"type": "array",
204+
"items": {
205+
"type": "string"
206+
}
201207
}
202208
]
203209
},

lib/utils/status.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function status(uri, options, log, useColor) {
4646
let openOptions = {};
4747
let openMessage = 'Unable to open browser';
4848

49-
if (typeof options.open === 'string') {
49+
if (typeof options.open === 'string' || Array.isArray(options.open)) {
5050
openOptions = { app: options.open };
5151
openMessage += `: ${options.open}`;
5252
}

0 commit comments

Comments
 (0)