File tree 3 files changed +34
-9
lines changed
3 files changed +34
-9
lines changed Original file line number Diff line number Diff line change @@ -151,16 +151,19 @@ var extensions = {
151
151
'.js' : null ,
152
152
'.json' : null ,
153
153
'.json5' : 'json5/lib/register' ,
154
- '.jsx' : {
155
- module : '@babel/register' ,
156
- register : function ( hook ) {
157
- hook ( {
158
- extensions : '.jsx' ,
159
- rootMode : 'upward-optional' ,
160
- overrides : [ { only : [ endsInJsx ] } ] ,
161
- } ) ;
154
+ '.jsx' : [
155
+ {
156
+ module : '@babel/register' ,
157
+ register : function ( hook ) {
158
+ hook ( {
159
+ extensions : '.jsx' ,
160
+ rootMode : 'upward-optional' ,
161
+ overrides : [ { only : [ endsInJsx ] } ] ,
162
+ } ) ;
163
+ } ,
162
164
} ,
163
- } ,
165
+ 'sucrase/register/jsx'
166
+ ] ,
164
167
'.litcoffee' : 'coffeescript/register' ,
165
168
'.mjs' : mjsStub ,
166
169
'.node' : null ,
Original file line number Diff line number Diff line change
1
+ {
2
+ "dependencies" : {
3
+ "sucrase" : " ^3.12.1"
4
+ }
5
+ }
Original file line number Diff line number Diff line change
1
+ const React = {
2
+ createElement : function ( Component ) {
3
+ return Component ( ) ;
4
+ } ,
5
+ } ;
6
+
7
+ // Test harmony arrow functions
8
+ const Component = ( ) => {
9
+ var trueKey = true ;
10
+ var falseKey = false ;
11
+ var subKey = { subProp : 1 } ;
12
+ // Test harmony object short notation
13
+ return { data : { trueKey, falseKey, subKey } } ;
14
+ } ;
15
+
16
+ // Test JSX syntax
17
+ module . exports = < Component /> ;
You can’t perform that action at this time.
0 commit comments