Skip to content

Commit

Permalink
feat(af-webpack): support disable detect-port via DETECT_PORT=none (#327
Browse files Browse the repository at this point in the history
)
  • Loading branch information
sorrycc committed Apr 13, 2018
1 parent f64ce77 commit 909fe17
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/af-webpack/src/choosePort.js
Expand Up @@ -8,6 +8,10 @@ import clearConsole from './clearConsole';
const isInteractive = process.stdout.isTTY;

export default function choosePort(defaultPort) {
if (process.env.DETECT_PORT === 'none') {
return Promise.resolve(defaultPort);
}

return detect(defaultPort).then(
port =>
new Promise(resolve => {
Expand Down

0 comments on commit 909fe17

Please sign in to comment.