Robert Smith
Nov 20, 2025
What is Just-In-Time (JIT) Mode?
Just-In-Time (JIT) compilation is a new approach to building Tailwind CSS projects that dynamically generates only the CSS you need during the build process. This results in significantly faster build speeds compared to previous versions without requiring any configuration changes.
"I'm excited to bring JIT compilation to Tailwind. It's been a huge undertaking to make this work without forcing developers to change their existing patterns."
— Adam Wathan, Creator of Tailwind CSS
Key Benefits
Instant Build Speed
Build times as fast as 0.25 seconds for small projects and as low as 1.2 seconds for large applications.
Smart Output
Only the CSS your project actually uses is generated, eliminating unnecessary bloat.
Seamless Integration
Works with existing project structures - no configuration required in most cases.
How JIT Works
module.exports = {
mode: 'jit',
content: [
'./src/**/*.html',
'./src/**/*.js'
],
theme: {
extend: {},
},
plugins: [],
}
The only configuration change needed is adding the mode: 'jit'
option in your configuration file.
Key Concepts
- Scans your project for class usage to determine required styles
- Processes classes in a single pass
- Optimizes for faster startup and incremental builds
Before vs After JIT
Traditional Build
Build duration: 2.4s CSS output size: 128KB Total classes used: 784 Unused classes: 3,217
JIT Build
Build duration: 0.35s CSS output size: 42KB Total classes used: 784 Unused classes: 0
Getting Started
For New Projects
Just install Tailwind CSS version 3.0 and up. The JIT mode is enabled by default when using the @tailwindcss/plugin and tailwindcss packages.
npx tailwindcss -i ./src/input.css -o ./dist/output.css --watch
For Existing Projects
Update your tailwind.config.js file to include mode: 'jit'
and ensure you have a recent version installed.
module.exports = {
mode: 'jit',
content: ['./app/**/*.html'],
// ...rest of config
}
Make Your Builds Faster
Whether you're building a small personal component or a large enterprise application, Tailwind's JIT compiler will give you dramatically faster build times while maintaining all of the features you expect from Tailwind.