Skip to content

Commit 58bc07e

Browse files
sathishsoundharajanjarlef
authored andcommitted
Clears the usage of react-jsx-source & react-jsx-self (facebook#992)
Explain the usage of react-jsx-source & react-jsx-self
1 parent 60b1a2f commit 58bc07e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/babel-preset-react-app/index.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ if (env !== 'development' && env !== 'test' && env !== 'production') {
5454
}
5555

5656
if (env === 'development' || env === 'test') {
57+
// The following two plugins are currently necessary to make React warnings
58+
// include more valuable information. They are included here because they are
59+
// currently not enabled in babel-preset-react. See the below threads for more info:
60+
// https://github.com/babel/babel/issues/4702
61+
// https://github.com/babel/babel/pull/3540#issuecomment-228673661
62+
// https://github.com/facebookincubator/create-react-app/issues/989
5763
plugins.push.apply(plugins, [
5864
// Adds component stack to warning messages
5965
require.resolve('babel-plugin-transform-react-jsx-source'),
@@ -99,4 +105,3 @@ if (env === 'test') {
99105
// ]);
100106
}
101107
}
102-

0 commit comments

Comments
 (0)