-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Output logging level for build #5029
Comments
Not following your requirement here. Exactly what is it you want less of in subsequent builds that you dont consider useful? |
Pretty much all the stuff it outputs. I definitely don't need hosting info, especially not every time I build. I don't really need file size info. While it's a nice statistic, its doesn't really add much value other than a "look how efficient the tool is". |
If you are on a nixy env you can pipe the output to /dev/null |
That's not the point. And that's not even a good suggestion. Doing that means I won't get any of the output. That is not ideal. The hosting message should not probably not be in the build message but rather should be shown on project creation. The file size could be shown if a verbose flag is passed. Please reconsider closing this issue |
@andriijas I run However, errors should still be printed (which is why piping to /dev/null doesn't work). Maybe a create-react-app/packages/react-scripts/build.js const argv = process.argv.slice(2);
const writeStatsJson = argv.indexOf('--stats') !== -1;
+const silent = argv.indexOf('--silent') !== -1;
...
+ if(!silent) {
console.log('File sizes after gzip:\n');
printFileSizesAfterBuild(
stats,
previousFileSizes,
paths.appBuild,
WARN_AFTER_BUNDLE_GZIP_SIZE,
WARN_AFTER_CHUNK_GZIP_SIZE
);
console.log();
const appPackage = require(paths.appPackageJson);
const publicUrl = paths.publicUrl;
const publicPath = config.output.publicPath;
const buildFolder = path.relative(process.cwd(), paths.appBuild);
printHostingInstructions(
appPackage,
publicUrl,
publicPath,
buildFolder,
useYarn
);
+ } |
Submit a pr? |
@andriijas Yup (#5429) However, the AppVeyor build fails on something seemingly unrelated:
It seems to happen to most new pull requests (some of them only run through Travis, though?). Do you know what's happening? |
By default (and I haven't found a way to change), the output from
npm run build
is very verbose and mostly unnecessary (after the first run). It would be nice if there was a way to specify log level to turn it off.The logging is output here:
create-react-app/packages/react-scripts/scripts/build.js
Lines 85 to 123 in 7b1a32b
The text was updated successfully, but these errors were encountered: