{"id":13781914,"url":"https://github.com/sonofmagic/weapp-tailwindcss","last_synced_at":"2026-04-02T13:18:18.368Z","repository":{"id":37012424,"uuid":"448897619","full_name":"sonofmagic/weapp-tailwindcss","owner":"sonofmagic","description":"weapp-tailwindcss - bring tailwindcss to weapp ! 把 tailwindcss 原子化思想带入小程序开发吧 !  ","archived":false,"fork":false,"pushed_at":"2026-02-12T17:33:27.000Z","size":260925,"stargazers_count":1743,"open_issues_count":9,"forks_count":98,"subscribers_count":11,"default_branch":"main","last_synced_at":"2026-02-13T01:23:27.903Z","etag":null,"topics":["mini","mp","mpx","postcss","rax","tailwind","tailwindcss","tarojs","uni-app","vite","weapp","webpack"],"latest_commit_sha":null,"homepage":"https://tw.icebreaker.top/","language":"TypeScript","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/sonofmagic.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"github":["sonofmagic"],"open_collective":"weapp-tailwindcss","custom":["https://github.com/sonofmagic/sponsors"]}},"created_at":"2022-01-17T13:07:03.000Z","updated_at":"2026-02-12T17:26:55.000Z","dependencies_parsed_at":"2023-10-16T08:21:02.992Z","dependency_job_id":"be5a711e-c691-49f0-bdaa-1d84fde2f2c3","html_url":"https://github.com/sonofmagic/weapp-tailwindcss","commit_stats":{"total_commits":1891,"total_committers":11,"mean_commits":171.9090909090909,"dds":"0.41195134849286097","last_synced_commit":"35e1a1519e2982fbb8d59bd3044b27388f7ae626"},"previous_names":["sonofmagic/weapp-tailwindcss","sonofmagic/weapp-tailwindcss-webpack-plugin"],"tags_count":702,"template":false,"template_full_name":"sonofmagic/npm-lib-template","purl":"pkg:github/sonofmagic/weapp-tailwindcss","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonofmagic%2Fweapp-tailwindcss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonofmagic%2Fweapp-tailwindcss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonofmagic%2Fweapp-tailwindcss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonofmagic%2Fweapp-tailwindcss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sonofmagic","download_url":"https://codeload.github.com/sonofmagic/weapp-tailwindcss/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonofmagic%2Fweapp-tailwindcss/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29501760,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T05:57:17.024Z","status":"ssl_error","status_checked_at":"2026-02-16T05:56:49.929Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["mini","mp","mpx","postcss","rax","tailwind","tailwindcss","tarojs","uni-app","vite","weapp","webpack"],"created_at":"2024-08-03T18:01:30.748Z","updated_at":"2026-04-02T13:18:18.359Z","avatar_url":"https://github.com/sonofmagic.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n\n\u003ca href=\"https://tw.icebreaker.top\"\u003e\n\n\u003cimg src=\"./assets/logo.png\" alt=\"weapp-tailwindcss-logo\" width=\"128\"\u003e\n\u003c/a\u003e\n\n\u003cbr\u003e\n\n\u003ch1 align=\"center\"\u003eweapp-tailwindcss\u003c/h1\u003e\n\n\u003c/p\u003e\n\n\u003e 简体中文(zh-cn) | [English](./README_en.md)\n\n![star](https://badgen.net/github/stars/sonofmagic/weapp-tailwindcss)\n![gstar](https://atomgit.com/sonofmagic/weapp-tailwindcss/star/badge.svg)\n![dm0](https://badgen.net/npm/dm/weapp-tailwindcss)\n![dm1](https://badgen.net/npm/dm/weapp-tailwindcss-webpack-plugin)\n![license](https://badgen.net/npm/license/weapp-tailwindcss)\n[![test](https://github.com/sonofmagic/weapp-tailwindcss/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/sonofmagic/weapp-tailwindcss/actions/workflows/test.yml)\n[![codecov](https://codecov.io/gh/sonofmagic/weapp-tailwindcss/branch/main/graph/badge.svg?token=zn05qXYznt)](https://codecov.io/gh/sonofmagic/weapp-tailwindcss)\n[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/sonofmagic/weapp-tailwindcss)\n\n\u003e [!NOTE]\n\u003e 降低开发维护成本，提升开发效率的 `小程序` `tailwindcss` 全方面解决方案\n\u003e\n\u003e `weapp-tailwindcss@4.2.x` 现已支持 `uni-app x` 同时构建 `Web`,`小程序`,`安卓`,`IOS`,`鸿蒙`，详见 [**uni-app x 专题**](https://tw.icebreaker.top/docs/uni-app-x)\n\n\\[[文档地址](https://tw.icebreaker.top)\\] \\| \\[[备用文档地址](https://ice-tw.netlify.app/)\\] \\| \\[[加入技术交流群](https://tw.icebreaker.top/docs/community/group)\\]\n\n- [特性](#特性)\n- [版本对应](#版本对应)\n- [环境要求](#环境要求)\n- [AI Skill (For Users)](#ai-skill-for-users)\n- [安装与使用方式](#安装与使用方式)\n- [生态和解决方案](#生态和解决方案)\n- [常见问题](#常见问题)\n- [各个框架的模板](#各个框架的模板)\n- [旧版本迁移指南](#旧版本迁移指南)\n- [配置项参考](#配置项参考)\n- [Contribute](#contribute)\n  - [热更新 e2e 回归](#热更新-e2e-回归)\n- [License](#license)\n- [Star History](#star-history)\n- [Related projects](#related-projects)\n  - [weapp-vite](#weapp-vite)\n\n## 特性\n\n| 不仅仅是`webpack`                                   | 主流框架与原生开发支持                          |\n| --------------------------------------------------- | ----------------------------------------------- |\n| ![wepback+vite+gulp](./assets/weapp-tw-plugins.png) | ![frameworks](./assets/weapp-tw-frameworks.png) |\n\n核心插件支持 `webpack`/`vite`/`rspack`/`rollup`/`rolldown`/`gulp` 为基底的框架类小程序开发，涵盖了市面上几乎所有的主流的开发框架。\n\n也支持直接从各个开发者工具中，直接创建的原生小程序应用。\n\n这些插件能够自动识别并精确处理所有 `tailwindcss` 的工具类来适配小程序环境。\n\n## 版本对应\n\n目前，`weapp-tailwindcss` 的 `4.x` 版本\n\n- 支持最新版本的 `tailwindcss v4` 和 `v3` 还有 `v2 jit` 版本。\n- 支持 `webpack5`，`webpack4`, `vite` 和 `gulp` 这些打包工具，也支持纯 `Nodejs` API 的方式，集成到你自己的构建工具中。\n\n\u003e 如果你还在使用 `tailwindcss@2` 版本，那你应该使用从 `weapp-tailwindcss/webpack4` 导出的本插件的 `postcss7` `webpack4` 版本。`weapp-tailwindcss@4` 需要 `nodejs` 版本 `^20.19.0 || \u003e=22.12.0`，建议安装 `nodejs` 的 `LTS` 版本，详见 [nodejs/release](https://github.com/nodejs/release)\n\n## 环境要求\n\n- Node.js `^20.19.0` 或 `\u003e=22.12.0`（建议 LTS）\n\n## AI Skill (For Users)\n\n如果你希望 AI 在你的业务项目中，按 `weapp-tailwindcss` 的最佳实践快速完成“小程序 + 多端”接入，可以先安装官方 Skill：\n\n```bash\nnpx skills add sonofmagic/skills --skill weapp-tailwindcss\n```\n\n安装后可用于：\n\n- 快速生成 `uni-app` / `taro` / `uni-app x` 接入配置\n- 输出可复制的安装命令、配置文件与验证步骤\n- 处理 `rpx` 任意值、`JS` 字符串 class 不生效等常见问题\n\nSkill 的执行流程（简版）：\n\n1. 先分流任务类型：新接入、迁移、排障、写法规范\n2. 先补齐最小上下文：框架、构建器、目标端、Tailwind 版本、是否 `pnpm@10+`\n3. 再给出可落地方案，并强制包含回滚路径\n\nSkill 输出默认包含：\n\n- 结论（框架 + Tailwind 版本 + 目标端）\n- 修改文件清单\n- 可复制配置与命令（默认 `pnpm`）\n- 验证步骤与预期结果\n- 回滚方案\n\n推荐同时阅读：\n\n- [Skill（技能系统）](https://tw.icebreaker.top/docs/ai/basics/skill)\n- [Tailwind 写法最佳实践（Skill 引用）](./skills/weapp-tailwindcss/references/tailwind-writing-best-practices.md)\n\n## [安装与使用方式](https://tw.icebreaker.top/docs/quick-start/install)\n\n## [生态和解决方案](https://tw.icebreaker.top/docs/community/templates)\n\n## [常见问题](https://tw.icebreaker.top/docs/issues/)\n\n## [各个框架的模板](https://tw.icebreaker.top/docs/community/templates)\n\n## [旧版本迁移指南](https://tw.icebreaker.top/docs/migrations/v2)\n\n## [配置项参考](https://tw.icebreaker.top/docs/api/interfaces/UserDefinedOptions)\n\n## Contribute\n\n我们邀请你来贡献和帮助改进 `weapp-tailwindcss` 💚💚💚\n\n以下有几个方式可以参与:\n\n- 报告错误：如果您遇到任何错误或问题，请提`issue`并提供完善的错误信息和复现方式。\n- 建议：有增强 `weapp-tailwindcss` 的想法吗？请提 `issue` 来分享您的建议。\n- 文档：如果您对文档有更好的见解或者更棒的修辞方式，欢迎 `pr`。\n- 代码：任何人的代码都不是完美的，我们欢迎你通过 `pr` 给代码提供更好的质量与活力。\n\n### 热更新 e2e 回归\n\n仓库现在提供独立于构建产物快照链路的 watch 回归链路，用于验证各 demo 在真实热更新场景下的生效性与耗时：\n\n- 全量运行：`pnpm e2e:watch`\n- 单项运行：`pnpm e2e:watch:taro` / `pnpm e2e:watch:uni` / `pnpm e2e:watch:mpx` / `pnpm e2e:watch:weapp-vite`\n- 包含预构建链路：`pnpm e2e:watch:full`\n\n该链路会注入复杂 Tailwind 类组合（任意值、小数、`calc()`、伪元素变体等），并统计 `hot update` 与 `rollback` 延迟，帮助持续优化日常开发性能。\n\n## License\n\n[MIT](./LICENSE)\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=sonofmagic/weapp-tailwindcss\u0026type=Date)](https://star-history.com/#sonofmagic/weapp-tailwindcss\u0026Date)\n\n## Related projects\n\n### weapp-vite\n\n[weapp-vite](https://vite.icebreaker.top/): 把现代化的开发模式带入小程序开发!\n","funding_links":["https://github.com/sponsors/sonofmagic","https://opencollective.com/weapp-tailwindcss","https://github.com/sonofmagic/sponsors"],"categories":["工具","TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonofmagic%2Fweapp-tailwindcss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsonofmagic%2Fweapp-tailwindcss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonofmagic%2Fweapp-tailwindcss/lists"}