
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@hyeon/babel-plugin-twin
Advanced tools
<img src="https://img.shields.io/npm/v/babel-plug
This plugin automatically adds the tw prop from twin.macro - no import required:
- import "twin.macro"
const Component = () => <div tw="block" />
You’ll also get the css prop from your css-in-js library:
const Component = () => <div css={`background-color: blue;`} />
npm i -D babel-plugin-twin
# or
yarn add babel-plugin-twin -D
Then add the plugin to your babel config:
module.exports = {
plugins: [
"babel-plugin-twin",
"babel-plugin-macros",
// ...
],
};
Note: You must add "babel-plugin-twin" before "babel-plugin-macros" in the plugins array.
Add debug to your config to see some feedback:
module.exports = {
plugins: [
["babel-plugin-twin", { debug: true }],
"babel-plugin-macros",
// ...
],
};
To avoid checking files or folders, supply exclude with an array of regex patterns:
module.exports = {
plugins: [
["babel-plugin-twin", {
"exclude": [
"temp/",
"..."
]
},
"babel-plugin-macros",
// ...
],
};
A big shoutout goes to @euvs for the plugin concept + code and @mxsbr for planting the idea.
FAQs
<img src="https://img.shields.io/npm/v/babel-plug
The npm package @hyeon/babel-plugin-twin receives a total of 0 weekly downloads. As such, @hyeon/babel-plugin-twin popularity was classified as not popular.
We found that @hyeon/babel-plugin-twin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.