Skip to content

Reconsider about using swc as JS/TS transformer #788

@Brooooooklyn

Description

@Brooooooklyn

In early days, the performance of swc is much worse than esbuild (around 2 ~ 5x slower).

But recently, the author of swc landed many performance enhancements in swc project.

Now the performance of transform API is very close between @swc/core and esbuild: transform parallel benchmark results

Besides, swc have some advantages over esbuild:

  • Support experimentalDecorators in TypeScript.
  • Support @jsx pragma.
  • Exposed transformer API, so community can customize transform plugin top on it jest-hoist-plugin.
  • (Maybe) more users, deno is strongly dependent on swc (They are using swc in --no-type-check mode).

/cc @yyx990803 @kdy1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions