Zero-config migration tool that automatically converts legacy CSS to TailwindCSS utility classes. Current stable version is 0.0.56, actively maintained with frequent releases. Supports Vue, React, Svelte, Astro, and vanilla HTML. Key differentiators include automatic safelist generation, circular build protection, and plugin support for Vite, Rollup, Webpack, and Rspack. Requires peer dependencies for Sass, Less, or Stylus preprocessors. Ships TypeScript types and offers CLI and programmatic usage both in Node.js and browser environments.
npm install transform-to-tailwindcssNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configures Vite plugin with auto safelist collection and output file generation.
Run npm install sass less less-plugin-module-resolver stylus to add missing preprocessors.
Run npm run build once before starting the dev server to generate the safelist file.
Ensure this plugin runs before any CSS processing plugins in your build tool configuration.
Use the Vite, Rollup, Webpack, or Rspack plugin instead of the CLI for better integration.
Review your plugin order and options to avoid infinite build loops.
Install sass: npm install sass
Use the correct named export for your bundler (e.g., vitePluginTransformTotailwindcss for Vite)
Ensure plugin is only applied to CSS/SCSS/Less/Stylus files, or set appropriate include/exclude options
Install the package: npm install transform-to-tailwindcss. For CJS, use require('transform-to-tailwindcss') with destructuring.