Skip to content

Commit

Permalink
feat: Add support for jsx precompile transform setting (#17)
Browse files Browse the repository at this point in the history
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
  • Loading branch information
marvinhagemeister and bartlomieju authored Oct 31, 2023
1 parent ac9ed93 commit 3ba958f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -911,8 +911,9 @@ impl ConfigFile {
}
return Ok(None);
}
Some("precompile") => "jsx-runtime".to_string(),
Some(setting) => bail!(
"Unsupported 'jsx' compiler option value '{}'. Supported: 'react-jsx', 'react-jsxdev', 'react'\n at {}",
"Unsupported 'jsx' compiler option value '{}'. Supported: 'react-jsx', 'react-jsxdev', 'react', 'precompile'\n at {}",
setting,
self.specifier,
),
Expand Down Expand Up @@ -1436,7 +1437,7 @@ mod tests {
assert_eq!(
config.to_maybe_jsx_import_source_config().err().unwrap().to_string(),
concat!(
"Unsupported 'jsx' compiler option value 'preserve'. Supported: 'react-jsx', 'react-jsxdev', 'react'\n",
"Unsupported 'jsx' compiler option value 'preserve'. Supported: 'react-jsx', 'react-jsxdev', 'react', 'precompile'\n",
" at file:///deno/tsconfig.json",
),
);
Expand Down

0 comments on commit 3ba958f

Please sign in to comment.