-
-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Closed
Description
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
| if (warnings.length) { | |
| console.log(chalk.yellow('Compiled with warnings.\n')); | |
| console.log(warnings.join('\n\n')); | |
| console.log( | |
| '\nSearch for the ' + | |
| chalk.underline(chalk.yellow('keywords')) + | |
| ' to learn more about each warning.' | |
| ); | |
| console.log( | |
| 'To ignore, add ' + | |
| chalk.cyan('// eslint-disable-next-line') + | |
| ' to the line before.\n' | |
| ); | |
| } else { | |
| console.log(chalk.green('Compiled successfully.\n')); | |
| } | |
| 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 | |
| ); | |
| }, |
Metadata
Metadata
Assignees
Labels
No labels