Atyantik / pawjs

A highly scalable & plugable, Progressive Web Application Framework with the best Developer Experience. This framework utilizes the power of React with Webpack and is build on top of webpack/tapable for unlimited extendability.
https://www.reactpwa.com
MIT License
165 stars 37 forks source link

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

Open mayurLinerloop opened 3 months ago

mayurLinerloop commented 3 months ago

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, ], };

3. Create new file called: "tailwind.config.js"

module.exports = { content: ['./src/*/.{js,jsx,ts,tsx}'], theme: { colors: { red: '#ff0000', }, extend: {}, }, plugins: [], };

4. Create new file called: "styles/style.css"

@tailwind base; @tailwind components; @tailwind utilities;


5. Called new css file in client.js like this: import './styles/style.css';
6. Add class "text-red" on div tag
mayurLinerloop commented 2 months ago

Hello @tirthbodawala, Hope you are doing well,

Can you please give a update on it?

Thanks