From 357ed8ebd7d890d14193962ced6c2fbcf563cec2 Mon Sep 17 00:00:00 2001 From: Daniel Friesen Date: Mon, 22 Jun 2015 11:58:46 -0700 Subject: [PATCH] Add a comment about why the string is split up. For future readers of this file. --- src/shared/utils/deprecated.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/shared/utils/deprecated.js b/src/shared/utils/deprecated.js index e73613301d..85eb17a1e5 100644 --- a/src/shared/utils/deprecated.js +++ b/src/shared/utils/deprecated.js @@ -30,6 +30,9 @@ function deprecated(fnName, newModule, ctx, fn) { var newFn = function() { warning( warned, + // Require examples in this string must be split to prevent React's + // build tools from mistaking them for real requires. + // Otherwise the build tools will attempt to build a '%s' module. '`require' + '("react").%s` is deprecated. Please use `require' + '("%s").%s` ' + 'instead.', fnName,