You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of just calling openBrowser, allow developers to pass in a script to kick off the start or open functionality. For example, this would be useful for use with electron development.
Proposed behavior
Inside: packages/react-scripts/scripts/start.js
@@ -279,7 +279,15 @@ function runDevServer(host, port, protocol) {
console.log();
if (isInteractive) {
- openBrowser(protocol + '://' + host + ':' + port + '/');
+ var devUrl = protocol + '://' + host + ':' + port + '/';
+ var startScriptPath = require(paths.appPackageJson).startScript || false;
+ if (startScriptPath) {
+ var path = require('path');
+ process.env.DEV_URL = devUrl;
+ require(path.join(process.cwd(), startScriptPath));
+ } else {
+ openBrowser(devUrl);
+ }
}
});
}
Thoughts?
The text was updated successfully, but these errors were encountered:
license2e
added a commit
to license2e/create-react-app
that referenced
this issue
Nov 24, 2016
Description
Instead of just calling
openBrowser
, allow developers to pass in a script to kick off the start or open functionality. For example, this would be useful for use with electron development.Proposed behavior
Inside:
packages/react-scripts/scripts/start.js
Thoughts?
The text was updated successfully, but these errors were encountered: