Skip to content

transformer: turn off typescript and jsx plugin by option and sourcetype  #6865

@Boshen

Description

@Boshen

typescript and jsx plugins should be

  • turned off by default when the source type is not ts / jsx.
  • can be turned off by an option

Change proposal:

struct TransformerImpl<'a, 'ctx> {
    x0_typescript: TypeScript<'a, 'ctx>,
    x1_react: React<'a, 'ctx>,
pub struct TransformOptions {
    pub typescript: TypeScriptOptions,
    pub react: JsxOptions,
}

Make these two optional.

In oxc_transformer/src/lib.rs,

change code to

        self.x0_typescript.map(|plugin| plugin.enter_program(program, ctx));

Metadata

Metadata

Assignees

Labels

C-enhancementCategory - New feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions