Skip to content

Commit

Permalink
fix(--open): resolved #1129
Browse files Browse the repository at this point in the history
With --open argument the run command used to open two tabs
  • Loading branch information
shahabganji authored and 3cp committed Sep 3, 2019
1 parent 6f652dc commit 4aded24
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
7 changes: 0 additions & 7 deletions lib/build/webpack-reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ module.exports = function reportReadiness(options) {
const yargs = require('yargs');
const argv = yargs.argv;
argv.color = require('supports-color');
const open = require('open');
const useColor = argv.color;

let startSentence = `Project is running at ${colorInfo(useColor, uri)}`;
Expand All @@ -23,12 +22,6 @@ module.exports = function reportReadiness(options) {
if (options.historyApiFallback) {
console.log(`404s will fallback to ${colorInfo(useColor, options.historyApiFallback.index || '/index.html')}`);
}

if (options.open) {
open(uri).catch(function() {
console.log('Unable to open browser. If you are running in a headless environment, please do not use the open flag.');
});
}
};

function createDomain(opts) {
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,11 @@
"gulp": "^4.0.2",
"htmlparser2": "^3.10.1",
"lead": "^1.0.0",
"lodash": "^4.17.15",
"lodash": "^4.17.14",
"map-stream": "0.0.7",
"mkdirp": "^0.5.1",
"node-libs-browser": "^2.2.1",
"npm-which": "^3.0.1",
"open": "^6.4.0",
"preprocess": "^3.1.0",
"pumpify": "^2.0.0",
"querystring-es3": "1.0.0-0",
Expand Down

0 comments on commit 4aded24

Please sign in to comment.