mirror of
https://github.com/danbulant/oxc
synced 2026-05-25 04:42:10 +00:00
feat(transformer/react-jsx): set automatic to the default value for runtime (#1270)
Align babel8
This commit is contained in:
parent
0fcd0fe28e
commit
7f01d48df3
2 changed files with 6 additions and 7 deletions
|
|
@ -46,7 +46,7 @@ fn default_pragma_frag() -> Cow<'static, str> {
|
|||
impl Default for ReactJsxOptions {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
runtime: ReactJsxRuntime::Classic,
|
||||
runtime: ReactJsxRuntime::Automatic,
|
||||
throw_if_namespace: default_throw_if_namespace(),
|
||||
import_source: default_import_source(),
|
||||
pragma: default_pragma(),
|
||||
|
|
@ -58,10 +58,10 @@ impl Default for ReactJsxOptions {
|
|||
#[derive(Debug, Default, Clone, Copy, Deserialize)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
pub enum ReactJsxRuntime {
|
||||
/// Does not automatically import anything (default).
|
||||
#[default]
|
||||
/// Does not automatically import anything.
|
||||
Classic,
|
||||
/// Auto imports the functions that JSX transpiles to.
|
||||
/// Auto imports the functions that JSX transpiles to (default).
|
||||
#[default]
|
||||
Automatic,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
Passed: 261/1080
|
||||
Passed: 262/1080
|
||||
|
||||
# All Passed:
|
||||
* babel-plugin-transform-numeric-separator
|
||||
|
|
@ -843,7 +843,7 @@ Passed: 261/1080
|
|||
* regression/11061/input.mjs
|
||||
* variable-declaration/non-null-in-optional-chain/input.ts
|
||||
|
||||
# babel-plugin-transform-react-jsx (136/156)
|
||||
# babel-plugin-transform-react-jsx (137/156)
|
||||
* autoImport/after-polyfills-compiled-to-cjs/input.mjs
|
||||
* autoImport/complicated-scope-module/input.js
|
||||
* react/arrow-functions/input.js
|
||||
|
|
@ -860,7 +860,6 @@ Passed: 261/1080
|
|||
* removed-options/invalid-use-builtins-true/input.js
|
||||
* removed-options/invalid-use-spread-false/input.js
|
||||
* removed-options/invalid-use-spread-true/input.js
|
||||
* runtime/defaults-to-automatic/input.js
|
||||
* runtime/invalid-runtime/input.js
|
||||
* spread-transform/transform-to-babel-extend/input.js
|
||||
* spread-transform/transform-to-object-assign/input.js
|
||||
|
|
|
|||
Loading…
Reference in a new issue