diff --git a/packages/react-scripts/scripts/start.js b/packages/react-scripts/scripts/start.js index 752bd8a08a8..03f77a2f4a6 100644 --- a/packages/react-scripts/scripts/start.js +++ b/packages/react-scripts/scripts/start.js @@ -60,6 +60,12 @@ if (isSmokeTest) { }; } +// Disabling clearing of console +var isVerbose = process.argv.some(arg => arg.indexOf('--verbose') > -1); +if (isVerbose) { + clearConsole = function() { return; }; +} + function setupCompiler(host, port, protocol) { // "Compiler" is a low-level interface to Webpack. // It lets us listen to some events and provide our own custom messages. diff --git a/packages/react-scripts/template/README.md b/packages/react-scripts/template/README.md index 48409092a27..480559c1418 100644 --- a/packages/react-scripts/template/README.md +++ b/packages/react-scripts/template/README.md @@ -125,6 +125,8 @@ Open [http://localhost:3000](http://localhost:3000) to view it in the browser. The page will reload if you make edits.
You will also see any lint errors in the console. +If you don't want the console to be cleared on reload, you can invoke `npm start --verbose` + ### `npm test` Launches the test runner in the interactive watch mode.