Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

changing tailwind.config.js in a laravel 10 project does not seem to be recognized

I have a new laravel 10 project using tailwindcss.
I am making changes to tailwind.config.js located in the root of the project.

After i make a change to this file, do i need to do anything else to incorporate the changes?

this is my config file

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

import defaultTheme from 'tailwindcss/defaultTheme';
import forms from '@tailwindcss/forms';

/** @type {import('tailwindcss').Config} */
export default {
    darkMode: 'class',
    content: [
    './vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php',
    './storage/framework/views/*.php',
    './resources/views/**/*.blade.php',
],

theme: {
    extend: {
        fontFamily: {
            sans: ['Figtree', ...defaultTheme.fontFamily.sans],
        },
    },
},
variants: {
    extend: {
        display: ['dark']
    },
},
plugins: [
    forms,
    require('flowbite/plugin')
],
};

>Solution :

After changing your tailwind.config.js file, you need to rebuild your CSS. This is because Tailwind CSS generates its utility classes at build time. So, any changes you make in the configuration file will not take effect until you rebuild your CSS.

npm run build
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading