Skip to content

Commit

Permalink
adds optional --hmr-port argument (#2308) (#2309)
Browse files Browse the repository at this point in the history
Now you can run a command:
npm run hot -- --hmr-port=8081

So webpack's output port is changable and won't cause port problems, see issue #2308

Co-authored-by: Patrik Krehák <info@ptk.sk>
  • Loading branch information
Patrik Krehák and Patrik Krehák committed Apr 2, 2020
1 parent d4679d3 commit 8f1a87e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/config.js
@@ -1,3 +1,5 @@
const argv = require('yargs').argv;

module.exports = function() {
return {
/**
Expand All @@ -23,7 +25,7 @@ module.exports = function() {
*/
hmrOptions: {
host: 'localhost',
port: '8080'
port: !!argv.hmrPort ? argv.hmrPort : '8080'
},

/**
Expand Down

0 comments on commit 8f1a87e

Please sign in to comment.