tw-migrate
| Install | |
|---|---|
npm install tw-migrate |
|
| Latest Version: | 0.8.2 |
| Older releases: | 3 |
| License: | MIT |
| Last Updated: | Oct 23, 2026 |
| Links: | GitHub · npm |
tw-migrate
Migrate static React/Next.js, Vue 3 SFC, and HTML stylesheet usage to Tailwind CSS v4 utilities. Supports CSS, SCSS, Sass, Less, and CSS Modules.
Requires Node.js 22.23.4+ and Tailwind CSS v4 configured in your project with a CSS entry such as @import "tailwindcss";. For Sass or Less, install the compiler in the project you are migrating.
Usage
Run from the package you want to migrate:
npx tw-migrate --dry-run # Preview changes
npx tw-migrate # Apply changes
npx tw-migrate path/to/Button.module.scss # Migrate one stylesheet
npx tw-migrate --workspaces # Migrate all packages
npx tw-migrate --help # See all options
pnpm dlx tw-migrate and yarn dlx tw-migrate accept the same arguments.
The CLI writes files by default. Review the preview before applying. Unsupported or ambiguous rules stay in place with warnings. Use --tailwind-css path/to/globals.css to select an entry when discovery is ambiguous.
More
Related Packages
ESLint plugin to enforce canonical Tailwind CSS class names using Tailwind CSS v...
Normalize Tailwinds: Tailwind shorthand audit, canonicalization checks, and safe...
The headless design system for Bouquet UI built with Jade Garden and Tailwind CS...
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.8.2 | catalog: | MIT | |
| 0.8.1 | catalog: | MIT | |
| 0.8.0 | catalog: | MIT | |
| 0.7.1 | catalog: | MIT | |
| 0.7.0 | catalog: | MIT | |
| 0.6.0 | catalog: | MIT | |
| 0.5.0 | catalog: | MIT | |
| 0.4.0 | catalog: | MIT | |
| 0.3.0 | catalog: | MIT | |
| 0.2.0 | 3.5.40 | MIT | |
| 0.1.0 | MIT |
Pre-releases (2)
| Version | Released | License |
|---|---|---|
| 0.1.0-alpha.1 | MIT | |
| 0.1.0-alpha.0 | MIT |