rollup-plugin-tailwind
Transform TailwindCSS classes to CSS-in-JS compatible object at build time. Tested with Emotion and Glamor but any CSS-in-JS library that accepts the same style object should work without a problem.
Installation
npm install --save-dev rollup-plugin-tailwind
Usage
// rollup.config.js;
Example
Before:
; ;
After:
; ;
Options
config
- Type:
String
(default: tailwind.config.js)
Changes the path of Tailwind configuration file
tailwind;
function
- Type:
String
(default: tailwind)
Changes the function name plugin is looking for to transform
tailwind;
only
- Type:
Array<String>
(default: [])
Array of minimatch strings to only include certain files
tailwind;