Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion napi/transform/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export interface TransformOptions {
/** Configure how TypeScript is transformed. */
typescript?: TypeScriptOptions
/** Configure how TSX and JSX are transformed. */
react?: JsxOptions
jsx?: JsxOptions
/** Enable ES2015 transformations. */
es2015?: ES2015BindingOptions
/**
Expand Down
4 changes: 2 additions & 2 deletions napi/transform/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub struct TransformOptions {
pub typescript: Option<TypeScriptOptions>,

/// Configure how TSX and JSX are transformed.
pub react: Option<JsxOptions>,
pub jsx: Option<JsxOptions>,

/// Enable ES2015 transformations.
pub es2015: Option<ES2015BindingOptions>,
Expand All @@ -45,7 +45,7 @@ impl From<TransformOptions> for oxc_transformer::TransformOptions {
Self {
cwd: options.cwd.map(PathBuf::from).unwrap_or_default(),
typescript: options.typescript.map(Into::into).unwrap_or_default(),
react: options.react.map(Into::into).unwrap_or_default(),
react: options.jsx.map(Into::into).unwrap_or_default(),
es2015: options.es2015.map(Into::into).unwrap_or_default(),
..Self::default()
}
Expand Down
2 changes: 1 addition & 1 deletion napi/transform/test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ test(
return <button onClick={() => setCount(count + 1)}>count is {count}</button>;
};
`,
{ react: { refresh: {} } },
{ jsx: { refresh: {} } },
),
{
code: 'var _s = $RefreshSig$();\n' +
Expand Down