diff --git a/lib/start.js b/lib/start.js index 82f6e05f..a989ea8a 100644 --- a/lib/start.js +++ b/lib/start.js @@ -17,12 +17,13 @@ module.exports = (config, callback) => { const compiler = webpack(webpackConfig); const devServer = new WebpackDevServer(compiler, webpackDevServerConfig); + const { port = 9000 } = config; - devServer.listen(config.port || 9000, 'localhost', (...args) => { + devServer.listen(port, 'localhost', (...args) => { const [err] = args; if (!err) { - opn('http://localhost:9000'); + opn(`http://localhost:${port}`); } if (typeof callback === 'function') {