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
Copy file name to clipboardExpand all lines: scripts/start.js
+8-7Lines changed: 8 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ var isSmokeTest = process.argv.some(arg =>
27
27
arg.indexOf('--smoke-test')>-1
28
28
);
29
29
if(isSmokeTest){
30
-
handleCompile=function(err,stats){
30
+
handleCompile=(err,stats)=>{
31
31
if(err||stats.hasErrors()||stats.hasWarnings()){
32
32
process.exit(1);
33
33
}else{
@@ -69,18 +69,19 @@ function clearConsole() {
69
69
}
70
70
71
71
varcompiler=webpack(config,handleCompile);
72
-
detect(PORT,function(error,_port){
72
+
detect(PORT,(error,_port)=>{
73
73
74
74
if(PORT!==_port){
75
75
varrl=readline.createInterface({
76
76
input: process.stdin,
77
77
output: process.stdout
78
78
});
79
79
80
-
rl.question('Something is already running at http://localhost:'+PORT+'. Would you like to run the app at another port instead? [Y/n] ',function(answer){
80
+
rl.question('Something is already running at http://localhost:'+PORT+'. Would you like to run the app at another port instead? [Y/n] ',answer=>{
81
81
if(answer==='Y'){
82
82
PORT=_port;
83
-
config.entry=config.entry.map(function(c){returnc.replace(/(\d+)/g,PORT)});// Replace the port in webpack config
0 commit comments