Moving from CDN playground to production requires tooling discipline. Use this checklist before shipping.
Production checklist
- Install via npm —
tailwindcss+ PostCSS or Vite plugin; avoid CDN in production - Content paths — include every template/source glob so classes are not purged incorrectly
- Minify — run cssnano or built-in minification in your pipeline
- Design tokens — document extended theme values for designers
- Accessibility — audit focus states, contrast, and keyboard flows independent of utilities
- Component boundaries — shared buttons/inputs as components, not 200-copy pasta
- Dark mode strategy —
classvsmediadocumented and tested
Contrast with hand-written CSS maintenance in CSS and preprocessor tracks like Sass when discussing build complexity with stakeholders.
Self-check
- Why is an accurate content config safety-critical?
- What breaks if you ship the CDN script to every user in production?
Challenge
Mental purge checklist
- List three file globs you would pass to
contentintailwind.config.js. - Name one dynamic class anti-pattern to avoid in PHP/JS strings.
Done when: you can explain how unused utilities are dropped in production.
Interview prep
- CDN vs npm Tailwind?
CDN is fine for learning and prototypes; production uses PostCSS, config, and purge for size and control.