@@ -33,41 +33,36 @@ It must be an array of the transforms you want to use:
33
33
34
34
``` js
35
35
{
36
- " stage " : 0 ,
36
+ " presets " : [ " es2015 " , " stage-0 " ] ,
37
37
" env" : {
38
38
// only enable it when process.env.NODE_ENV is 'development' or undefined
39
39
" development" : {
40
- " plugins" : [" react-transform" ],
41
- " extra" : {
42
- // must be an object
43
- " react-transform" : {
44
- // must be an array
45
- " transforms" : [{
46
- " transform" : " react-transform-catch-errors" ,
47
- // now go the imports!
48
- " imports" : [
49
-
50
- // the first import is your React distribution
51
- // (if you use React Native, pass "react-native" instead)
52
-
53
- " react" ,
54
-
55
- // the second import is the React component to render error
56
- // (it can be a local path too, like "./src/ErrorReporter")
57
-
58
- " redbox-react" ,
59
-
60
- // the third import is OPTIONAL!
61
- // when specified, its export is used as options to the reporter.
62
- // see specific reporter's docs for the options it needs.
63
-
64
- // "./src/reporterOptions"
65
- ]
66
- }]
67
- // note: you can put more transforms into array
68
- // this is just one of them!
69
- }
70
- }
40
+ " plugins" : [[" react-transform" , {
41
+ " transforms" : [{
42
+ " transform" : " react-transform-catch-errors" ,
43
+ // now go the imports!
44
+ " imports" : [
45
+
46
+ // the first import is your React distribution
47
+ // (if you use React Native, pass "react-native" instead)
48
+
49
+ " react" ,
50
+
51
+ // the second import is the React component to render error
52
+ // (it can be a local path too, like "./src/ErrorReporter")
53
+
54
+ " redbox-react" ,
55
+
56
+ // the third import is OPTIONAL!
57
+ // when specified, its export is used as options to the reporter.
58
+ // see specific reporter's docs for the options it needs.
59
+
60
+ // "./src/reporterOptions"
61
+ ]
62
+ }]
63
+ // note: you can put more transforms into array
64
+ // this is just one of them!
65
+ }]],
71
66
}
72
67
}
73
68
}
0 commit comments