What plugins do you need to use swc in your app? #4768
Replies: 23 comments 27 replies
|
SolidJS/dom-expressions JSX transform, although it seems like some of the SolidJS community members are already giving it a shot. |
|
At least for Tamagui, the ideal would be a swc-babel-api that mimicked babel as much as possible. Not sure if the fundamentals are so different that it’s impossible, but honestly the Babel API is incredibly good and all the useful helpers there make a big difference. |
|
Hope swc can prodive capacity like @vue/babel-plugin-jsx to handle |
This comment has been hidden.
This comment has been hidden.
|
Feedback from TikTok Web team:
|
This comment has been hidden.
This comment has been hidden.
|
Throwing my hat in for SASS/SCSS support, as mentioned in discussion. I'm writing an Actix web application and it'd be nice to stay in the Rust ecosystem for asset compilation. It would provide interesting options for the application to manage its own assets directly. |
|
https://github.com/davesnx/babel-plugin-transform-react-qa-classes |
This comment has been hidden.
This comment has been hidden.
|
To use Storybook with complete SWC support, the storybook-addon-swc plugin is not enough. |
|
We're currently blocked by dependency on babel-plugin-macros by LinguiJs library. Having a custom swc plugin for Lingui would enable us to switch from babel. |
This comment was marked as off-topic.
This comment was marked as off-topic.
|
We need babel-plugin-react-remove-properties, it's completed in next.js. |
|
@babel/plugin-transform-react-constant-elements to optmize bundle for the react app |
|
babel-plugin-transform-goober to rewrite code from |
|
I made some utility plugins |
|
https://github.com/facebook/stylex/tree/main/packages/babel-plugin |
|
Something like https://github.com/lemonmade/babel-plugin-react-component-data-attribute or https://github.com/davesnx/babel-plugin-transform-react-qa-classes would be great. https://github.com/hjkcai/swc-plugin-add-display-name is close but sets a display name for React Devtools, whereas those two plugins set a data attribute with the name (for testing or for marketing folk to use when setting up click tracking etc) |
|
It would be helpful to have something like this:
This makes react errors show up better |
|
anything for |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Context
There are numbers of request to add features in
@swc/core. It is currently scattered around gh issues and discussions, and not clearly compiled as list as some are requested as core features, and some goes to the plugins and some elses.This post attempts to collect list of the features people use, but not available in swc currently which blocks adaption of the swc in the certain app user currently build.
Few disclaimer:
This is more of collecting real world usecases for now.
There are some existing plugins. Check #4818 for the details.
NOTE:
**Any plugin relies on
babel-plugin-macrohave same constraint to #4768 (reply in thread) (babel-plugin-macros pass babel object to macros) - which SWC can't provide feature parity to macro itself. We do not have any immediate plan to investigate similar approaches. **All reactions