{"id":23392839,"url":"https://github.com/leegeunhyeok/swc-plugin-nativewind","last_synced_at":"2025-04-08T15:42:21.603Z","repository":{"id":208618375,"uuid":"721505977","full_name":"leegeunhyeok/swc-plugin-nativewind","owner":"leegeunhyeok","description":"Swc plugin implementation of the NativeWind babel plugin","archived":false,"fork":false,"pushed_at":"2023-12-17T04:32:59.000Z","size":182,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-14T11:54:18.762Z","etag":null,"topics":["nativewind","swc","tailwind"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/swc-plugin-nativewind","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leegeunhyeok.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-21T07:49:51.000Z","updated_at":"2024-05-09T19:35:49.000Z","dependencies_parsed_at":"2023-12-16T11:40:19.900Z","dependency_job_id":"e363a3c6-99ba-4c45-9835-122168d2dd05","html_url":"https://github.com/leegeunhyeok/swc-plugin-nativewind","commit_stats":null,"previous_names":["leegeunhyeok/swc-plugin-nativewind"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leegeunhyeok%2Fswc-plugin-nativewind","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leegeunhyeok%2Fswc-plugin-nativewind/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leegeunhyeok%2Fswc-plugin-nativewind/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leegeunhyeok%2Fswc-plugin-nativewind/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leegeunhyeok","download_url":"https://codeload.github.com/leegeunhyeok/swc-plugin-nativewind/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247873566,"owners_count":21010482,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nativewind","swc","tailwind"],"created_at":"2024-12-22T05:16:28.414Z","updated_at":"2025-04-08T15:42:21.572Z","avatar_url":"https://github.com/leegeunhyeok.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# swc-plugin-nativewind\n\nSwc plugin implementation of the [NativeWind v4.x](https://github.com/marklawlor/nativewind) babel plugin.\n\n✨ `100%` coverage of [test cases](https://github.com/marklawlor/nativewind/blob/main/packages/react-native-css-interop/src/__tests__/babel-plugin.ts) in NativeWind. (checkout the test cases [here](https://github.com/leegeunhyeok/swc-plugin-nativewind/tree/master/transform/tests/fixture))\n\n## Installation\n\nRequirement: `\u003e= @swc/core@1.3.81`\n\n```bash\nnpm install swc-plugin-nativewind\n# or yarn\nyarn add swc-plugin-nativewind\n```\n\n## Usage\n\n```ts\nimport { transform } from '@swc/core';\n\nawait transform(code, {\n  jsc: {\n    transform: {\n      react: {\n        runtime: 'automatic',\n        importSource: 'react-native-css-interop',\n      },\n    },\n    experimental: {\n      plugins: [['swc-plugin-nativewind', {}]],\n    },\n    externalHelpers: false,\n  },\n});\n```\n\n## Preview\n\nBefore\n\n```tsx\nimport React, { createElement } from 'react';\nimport { Container, Section } from '@app/components';\n\nexport function Demo(): JSX.Element {\n  return (\n    \u003cContainer\u003e\n      \u003cSection\u003e{React.createElement('h1', null)}\u003c/Section\u003e\n      \u003cSection\u003e{createElement('div', null)}\u003c/Section\u003e\n    \u003c/Container\u003e\n  );\n};\n```\n\nAfter\n\n```js\nimport { jsx as _jsx, jsxs as _jsxs } from \"react-native-css-interop/jsx-runtime\";\nimport { createElementAndCheckCssInterop as __c } from \"react-native-css-interop\";\nimport React, { createElement } from \"react\";\nimport { Container, Section } from \"@app/components\";\nexport function MyComponent() {\n  return /*#__PURE__*/ _jsxs(Container, {\n    children: [\n      /*#__PURE__*/ _jsx(Section, {\n        children: __c(\"h1\", null)\n      }),\n      /*#__PURE__*/ _jsx(Section, {\n        children: __c(\"div\", null)\n      })\n    ]\n  });\n}\n```\n\n## License\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleegeunhyeok%2Fswc-plugin-nativewind","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleegeunhyeok%2Fswc-plugin-nativewind","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleegeunhyeok%2Fswc-plugin-nativewind/lists"}