Skip to content

Commit

Permalink
refactor(turbopack): consolidate jsx fast refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
kwonoj committed May 15, 2023
1 parent 21bc5ab commit a9606d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/turbopack/src/module_options/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ impl ModuleOptionsVc {
let jsx = enable_jsx.await?;

transforms.push(EcmascriptInputTransform::React {
refresh: enable_react_refresh,
refresh: enable_react_refresh || jsx.react_refresh,
import_source: OptionStringVc::cell(jsx.import_source.clone()),
runtime: OptionStringVc::cell(jsx.runtime.clone()),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ impl WebpackLoadersOptions {
}
}

// [TODO]: should enabled_react_refresh belong to this options?
#[turbo_tasks::value(shared)]
#[derive(Default, Clone, Debug)]
pub struct JsxTransformOptions {
pub react_refresh: bool,
pub import_source: Option<String>,
pub runtime: Option<String>,
}
Expand Down

0 comments on commit a9606d0

Please sign in to comment.