Here is the structure of my package.json file.
"scripts": {
"start": "yarn run watch-css && craco start",
"build": "yarn run build-css && craco build",
"test": "craco test",
"eject": "react-scripts eject",
"build-css": "craco src/index.css -o public/tailwind.css",
"watch-css": "craco src/index.css -o public/tailwind.css"
},
**craco.config.js** content:
// craco.config.js
module.exports = {
style: {
postcss: {
plugins: [
require('tailwindcss'),
require('autoprefixer'),
],
},
},
}
This is the configuration of my tailwind.config.js file:
module.exports = {
purge: ['./src/**/*.{js,jsx,ts,tsx,css}',
'./public/index.html','./public/tailwind.css'],
}
Below is how my style.css file is structured. /* ./your-css-folder/styles.css */
@tailwind base;
@tailwind components;
@tailwind utilities;
I also have an uncompressed file in my public folder named tailwind.css which is 4,188kb in size and contains all the tailwindcss classes. I am looking for ways to purge this file. How can I go about achieving this?