From 448c0211e908a7382c8dead8050f300f59b9f71c Mon Sep 17 00:00:00 2001 From: Benjamin Tan Date: Wed, 28 Sep 2016 13:34:54 +0800 Subject: [PATCH] Automatically remove testing code when ejecting. --- packages/react-scripts/scripts/start.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/react-scripts/scripts/start.js b/packages/react-scripts/scripts/start.js index 5ce896568eb..74a96357942 100644 --- a/packages/react-scripts/scripts/start.js +++ b/packages/react-scripts/scripts/start.js @@ -41,8 +41,8 @@ var DEFAULT_PORT = process.env.PORT || 3000; var compiler; var handleCompile; -// You can safely remove this after ejecting. -// We only use this block for testing of Create React App itself: +// @remove-on-eject-begin +// This block is used for testing of Create React App itself: var isSmokeTest = process.argv.some(arg => arg.indexOf('--smoke-test') > -1); if (isSmokeTest) { handleCompile = function (err, stats) { @@ -53,6 +53,7 @@ if (isSmokeTest) { } }; } +// @remove-on-eject-end function setupCompiler(host, port, protocol) { // "Compiler" is a low-level interface to Webpack.