@@ -7,7 +7,7 @@ pub mod oxc {
7
7
parser:: Parser ,
8
8
semantic:: SemanticBuilder ,
9
9
span:: SourceType ,
10
- transformer:: { ReactOptions , TransformOptions , Transformer , TypeScriptOptions } ,
10
+ transformer:: { JsxOptions , TransformOptions , Transformer , TypeScriptOptions } ,
11
11
} ;
12
12
13
13
pub fn transform ( path : & Path , source_text : & str ) -> ( Allocator , String ) {
@@ -19,7 +19,7 @@ pub mod oxc {
19
19
let mut program = ret. program ;
20
20
let transform_options = TransformOptions {
21
21
typescript : TypeScriptOptions :: default ( ) ,
22
- react : ReactOptions :: default ( ) ,
22
+ react : JsxOptions :: default ( ) ,
23
23
..TransformOptions :: default ( )
24
24
} ;
25
25
let ( symbols, scopes) = SemanticBuilder :: new ( source_text)
@@ -29,14 +29,13 @@ pub mod oxc {
29
29
let ret = Transformer :: new (
30
30
& allocator,
31
31
path,
32
- source_type,
33
32
source_text,
34
33
trivias. clone ( ) ,
35
34
transform_options,
36
35
)
37
36
. build_with_symbols_and_scopes ( symbols, scopes, & mut program) ;
38
37
assert ! ( ret. errors. is_empty( ) ) ;
39
- CodeGenerator :: new ( ) . build ( & program) . source_text
38
+ CodeGenerator :: new ( ) . build ( & program) . code
40
39
} ;
41
40
42
41
( allocator, printed)
0 commit comments