Skip to content

Add SWC Plugin #144

Closed
Closed
@heygrady

Description

@heygrady

https://swc-project.github.io/docs/usage-plugin

Proposal: create an swc-plugin-macros that is similar to babel-plugin-macros

SWC is increasing in popularity. It is aiming to be a drop-in replacement for babel with some significant speed improvements. It already has a webpack loader.

There is some early interest in how it might integrate with create-react-app (facebook/create-react-app#8060). Looking at which babel plugins create-react-app uses it seems like most of those things are supported by swc (with only a few exceptions).

SWC appears to be missing support for:

  1. babel-plugin-macros (important for some of my projects)
  2. babel-plugin-transform-react-remove-prop-types (less important in TypeScript projects)
  3. babel-plugin-transform-flow-strip-types (generally SWC has no Flow support 🤷🏻‍♂️)

Generally everything else babel does for me is handled by swc preset-env (or isn't particularly vital to my projects).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions