Skip to content

Commit e04637f

Browse files
chyipinrandycoulman
authored andcommitted
Use real build path name in build output (facebook#1478)
Use the configured appBuild value in paths.js instead of hard-coding it to 'build'. This is helpful for the ejected case where the appBuild path is changed to another folder name.
1 parent 14e9d10 commit e04637f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/react-scripts/scripts/build.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -214,15 +214,16 @@ function build(previousSizeMap) {
214214
console.log(' ' + chalk.green('"homepage"') + chalk.cyan(': ') + chalk.green('"http://myname.github.io/myapp"') + chalk.cyan(','));
215215
console.log();
216216
}
217-
console.log('The ' + chalk.cyan('build') + ' folder is ready to be deployed.');
217+
var build = path.relative(process.cwd(), paths.appBuild);
218+
console.log('The ' + chalk.cyan(build) + ' folder is ready to be deployed.');
218219
console.log('You may also serve it locally with a static server:')
219220
console.log();
220221
if (useYarn) {
221222
console.log(' ' + chalk.cyan('yarn') + ' global add pushstate-server');
222223
} else {
223224
console.log(' ' + chalk.cyan('npm') + ' install -g pushstate-server');
224225
}
225-
console.log(' ' + chalk.cyan('pushstate-server') + ' build');
226+
console.log(' ' + chalk.cyan('pushstate-server') + ' ' + build);
226227
console.log(' ' + chalk.cyan(openCommand) + ' http://localhost:9000');
227228
console.log();
228229
}

0 commit comments

Comments
 (0)