Skip to content

Instantly share code, notes, and snippets.

View jaksm's full-sized avatar

Jaksa Malisic jaksm

  • Belgrade, Serbia
View GitHub Profile
@jaksm
jaksm / TailwindCSS + PurgeCSS React
Last active January 4, 2023 22:14
Tailwind css and Purge css with create-react-app
Steps to reproduce:
1. npx create-react-app my-app
2. yarn add --dev tailwindcss autoprefixer postcss-cli @fullhuman/postcss-purgecss
3. ./node_modules/.bin/tailwind init tailwind.js
4. touch tailwind.css
5. touch postcss.config.js
6. modify start script in package.json: "node scripts/start.js && postcss ./tailwind.css -o src/App.css -w",
7. modify build script in package.json: "node scripts/build.js && postcss ./tailwind.css -o src/App.css"