@@ -145,16 +145,6 @@ pub struct Warnings {
145145 pub error : Option < Error > ,
146146}
147147
148- #[ derive( Deserialize , Debug , Clone , PartialEq , Hash ) ]
149- #[ serde( untagged) ]
150- pub enum Reason {
151- Versioned {
152- #[ serde( rename = "react-jsx" ) ]
153- react_jsx : i32 ,
154- } ,
155- Unversioned ( bool ) ,
156- }
157-
158148#[ derive( Deserialize , Debug , Clone ) ]
159149#[ serde( untagged) ]
160150pub enum NamespaceConfig {
@@ -212,7 +202,6 @@ pub struct Config {
212202 pub ppx_flags : Option < Vec < OneOrMore < String > > > ,
213203 #[ serde( rename = "bsc-flags" , alias = "compiler-flags" ) ]
214204 pub bsc_flags : Option < Vec < OneOrMore < String > > > ,
215- pub reason : Option < Reason > ,
216205 pub namespace : Option < NamespaceConfig > ,
217206 pub jsx : Option < JsxSpecs > ,
218207 #[ serde( rename = "gentypeconfig" ) ]
@@ -373,22 +362,15 @@ impl Config {
373362 }
374363 }
375364 pub fn get_jsx_args ( & self ) -> Vec < String > {
376- match ( self . reason . to_owned ( ) , self . jsx . to_owned ( ) ) {
377- ( _ , Some ( jsx) ) => match jsx. version {
365+ match self . jsx . to_owned ( ) {
366+ Some ( jsx) => match jsx. version {
378367 Some ( version) if version == 3 || version == 4 => {
379368 vec ! [ "-bs-jsx" . to_string( ) , version. to_string( ) ]
380369 }
381370 Some ( _version) => panic ! ( "Unsupported JSX version" ) ,
382371 None => vec ! [ ] ,
383372 } ,
384- ( Some ( Reason :: Versioned { react_jsx } ) , None ) => {
385- vec ! [ "-bs-jsx" . to_string( ) , format!( "{}" , react_jsx) ]
386- }
387- ( Some ( Reason :: Unversioned ( true ) ) , None ) => {
388- // If Reason is 'true' - we should default to the latest
389- vec ! [ "-bs-jsx" . to_string( ) ]
390- }
391- _ => vec ! [ ] ,
373+ None => vec ! [ ] ,
392374 }
393375 }
394376
0 commit comments