|
|
@ -3,8 +3,7 @@ const hot = require('neutrino-middleware-hot'); |
|
|
|
const opn = require('opn'); |
|
|
|
|
|
|
|
module.exports = (neutrino, options = {}) => { |
|
|
|
neutrino.use(hot); |
|
|
|
|
|
|
|
if (process.env.NODE_ENV === 'development') { |
|
|
|
const config = neutrino.config; |
|
|
|
const server = ramda.pathOr({}, ['options', 'server'], neutrino); |
|
|
|
const protocol = process.env.HTTPS ? 'https' : 'http'; |
|
|
@ -31,6 +30,7 @@ module.exports = (neutrino, options = {}) => { |
|
|
|
openInBrowser = Boolean(options.open); |
|
|
|
} |
|
|
|
|
|
|
|
neutrino.use(hot); |
|
|
|
config |
|
|
|
.devServer |
|
|
|
.host(String(host)) |
|
|
@ -67,4 +67,5 @@ module.exports = (neutrino, options = {}) => { |
|
|
|
opn(`${protocol}://${endHost}:${port}`); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|