skip to Main Content

I am learning Tailwind css.
Could anyone help me with the following?

I want to use SCCSS with Tailwin CSS.

How to achieve it?

Thanks in advance!

2

Answers


  1. It’s pretty much same

    1. Install: npm install sass --save-dev
    2. Import: import '../scss/yourStyle.scss';

    Your style will be applied.

    But I don’t think you need SCSS when you use TailwindCSS though. TailwindCSS is very powerful

    Login or Signup to reply.
    1. npm install node-sass
    2. Create styles.scss file and import tailwindcss @import 'tailwindcss/base'; @import 'tailwindcss/components'; @import 'tailwindcss/utilities';
    3. in tailwind.config.js add to module.exports next code:
    module.exports = {
      //...
      mode: 'jit',
      module: {
        rules: [
          {
            test: /.scss$/,
            use: [
              'style-loader',
              'css-loader',
              'sass-loader',
            ],
          },
        ],
      },
      //...
     };
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search