File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 46
46
"babel-jest" : " ^9.0.3" ,
47
47
"babel-loader" : " ^6.2.4" ,
48
48
"babel-plugin-react-transform" : " ^2.0.2" ,
49
+ "babel-plugin-transform-react-constant-elements" : " ^6.5.0" ,
50
+ "babel-plugin-transform-react-inline-elements" : " ^6.6.5" ,
51
+ "babel-plugin-transform-react-remove-prop-types" : " ^0.2.4" ,
49
52
"babel-plugin-transform-runtime" : " ^6.6.0" ,
50
53
"babel-preset-es2015" : " ^6.6.0" ,
51
54
"babel-preset-node5" : " ^11.0.1" ,
Original file line number Diff line number Diff line change @@ -34,6 +34,19 @@ const GLOBALS = {
34
34
// client-side (client.js) and server-side (server.js) bundles
35
35
// -----------------------------------------------------------------------------
36
36
37
+ let babelLoaderPlugins = [
38
+ 'transform-runtime' ,
39
+ ] ;
40
+
41
+ if ( ! DEBUG ) {
42
+ babelLoaderPlugins = [
43
+ ...babelLoaderPlugins ,
44
+ 'transform-react-remove-prop-types' ,
45
+ 'transform-react-constant-elements' ,
46
+ 'transform-react-inline-elements' ,
47
+ ] ;
48
+ }
49
+
37
50
const config = {
38
51
context : path . resolve ( __dirname , '../src' ) ,
39
52
@@ -63,9 +76,7 @@ const config = {
63
76
'es2015' ,
64
77
'stage-0' ,
65
78
] ,
66
- plugins : [
67
- 'transform-runtime' ,
68
- ] ,
79
+ plugins : babelLoaderPlugins ,
69
80
} ,
70
81
} ,
71
82
{
You can’t perform that action at this time.
0 commit comments