pawjs
pawjs copied to clipboard
How Can we configure tailwindCSS in PawJS version ^3.0.2-beta.17?
Currently working with "3.0.2-beta.17" version of Paw.js and i am trying to configure tailwindCSS into it. after configuration didn't get any error but tailwind classes not working.
I have followed below steps for implement tailwindCSS:
- Add packages: tailwindcss, postcss, autoprefixer
- Create new file called: "postcss.config.js"
import tailwindcss from 'tailwindcss';
import path from 'path';
import autoprefixer from 'autoprefixer';
module.exports = {
plugins: [
// ...
tailwindcss(path.resolve(__dirname, 'tailwind.config.js')),
autoprefixer,
],
};
- Create new file called: "tailwind.config.js"
module.exports = {
content: ['./src/**/*.{js,jsx,ts,tsx}'],
theme: {
colors: {
red: '#ff0000',
},
extend: {},
},
plugins: [],
};
- Create new file called: "styles/style.css"
@tailwind base;
@tailwind components;
@tailwind utilities;
- Called new css file in client.js like this: import './styles/style.css';
- Add class "text-red" on div tag