Easy Tailwind CSS with NWB

Process any .css file with Tailwind by leveraging NWB’s built-in support for Postcss

Patrick Smith
The Tech Bench
1 min readNov 13, 2017

--

Install NWB

(a) Add to an existing project

(b) Create a new project

Note: NWB also has built-in support for Preact (substitute preact-app above), or can be customized to support other JavaScript app frameworks.

Install Tailwind

Create Tailwind’s configuration file:

You can customize this file to your heart’s content by following the guide.

Configure Webpack

Edit the nwb.config.js file like so:

Now running or building with NWB will live reload .css file with Tailwind support:

That’s it!

Send me any questions on Twitter: @concreteniche

--

--

Patrick Smith
The Tech Bench

@concreteniche · Product designer for the web & Mac. Loves experimenting with React, Swift, and UX tools.