We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6f7699 commit 1af2520Copy full SHA for 1af2520
scripts/start.js
@@ -12,6 +12,7 @@ process.env.NODE_ENV = 'development';
12
var webpack = require('webpack');
13
var WebpackDevServer = require('webpack-dev-server');
14
var config = require('../webpack.config.dev');
15
+var execSync = require('child_process').execSync;
16
17
new WebpackDevServer(webpack(config), {
18
publicPath: config.output.publicPath,
@@ -37,4 +38,11 @@ new WebpackDevServer(webpack(config), {
37
38
return console.log(err);
39
}
40
console.log('Listening at http://localhost:3000/');
41
+
42
+ try {
43
+ execSync('ps cax | grep "Google Chrome"');
44
+ execSync('open -a "Google Chrome" http://localhost:3000/');
45
+ } catch(e) {
46
+ // Do nothing if Chrome cannot be opened
47
+ }
48
});
0 commit comments