pawjs icon indicating copy to clipboard operation
pawjs copied to clipboard

How Can we configure tailwindCSS in PawJS version ^3.0.2-beta.17?

Open mayurLinerloop opened this issue 7 months ago • 1 comments

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:

  1. Add packages: tailwindcss, postcss, autoprefixer
  2. 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,
  ],
};

  1. Create new file called: "tailwind.config.js"
module.exports = {
  content: ['./src/**/*.{js,jsx,ts,tsx}'],
  theme: {
    colors: {
      red: '#ff0000',
    },
    extend: {},
  },
  plugins: [],
};
  1. Create new file called: "styles/style.css"
@tailwind base;
@tailwind components;
@tailwind utilities;

  1. Called new css file in client.js like this: import './styles/style.css';
  2. Add class "text-red" on div tag

mayurLinerloop avatar Jul 22 '24 07:07 mayurLinerloop