Getting Started
GaleforceCSS reads your existing tailwind.config.{js,ts} and produces the same CSS output as Tailwind v3 — 23x faster.
Prerequisites
- Node 18.18+
- A Vite project using Tailwind v3 (or starting fresh)
Installation
npm install -D vite-plugin-galeforcecssPlatform binaries ship in the package. No Rust toolchain required.
Vite setup
The plugin registers itself as a PostCSS plugin inside Vite's CSS pipeline. Your existing @tailwind / @apply / theme() / @layer directives in any .css / .scss / .sass / .less file work unchanged:
// vite.config.js
import { defineConfig } from 'vite'
import galeforcecss from 'vite-plugin-galeforcecss'
export default defineConfig({
plugins: [galeforcecss()],
})/* src/index.css — unchanged */
@tailwind base;
@tailwind components;
@tailwind utilities;@apply in component-scoped styles also works:
.btn {
@apply px-4 py-2 rounded-lg;
}Migrating from Tailwind's PostCSS plugin
Remove
tailwindcssfrom your PostCSS config:js// postcss.config.js export default { plugins: { // tailwindcss: {}, ← remove autoprefixer: {}, }, }Add
vite-plugin-galeforcecsstovite.config.js(above).Uninstall
tailwindcss:bashnpm uninstall tailwindcss
Your tailwind.config.{js,ts} and CSS files are untouched. Output is semantically identical (verified on 894 fixtures + 7 real projects).
Plugin options
All optional:
galeforcecss({
config: 'tailwind.config.js', // auto-discovered if omitted
content: ['src/**/*.{html,ts}'], // defaults to tailwind.config `content`
minify: true, // defaults to Vite's build.cssMinify
sourceMap: true, // defaults to Vite's build.sourcemap
targets: { chrome: '95' }, // Lightning CSS browser targets
})Optional: virtual-module mode
For a single plugin-owned stylesheet instead of inline directive expansion:
galeforcecss({ input: 'src/index.css' })// src/main.ts
import 'virtual:galeforcecss.css'Most projects don't need this — the drop-in PostCSS mode covers what Tailwind v3 did.