Laravel Tailwind Purge PostProcessor – Include classes in PHP file


I am using a form builder package which keeps the classes in the PHP files (see below one example).

However purge is removing these css classes thus they are not applying.

Trying to work if you can can regex a php file as the data is all as follows

Arrays like below..

'label_class' => 'ml-2 block text-sm text-gray-900 capitalize',
'field_class' => 'h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded'

My (current, not working) config.

mode: "jit",
purge: [
    "./resources/**/*.blade.php",
    "./resources/**/*.js",
    "./resources/**/*.vue",
    "./app/Forms/Auth/LoginForm.php",
],

Any help much appreciated

Source: CSS – Stack Overflow

September 2, 2021
Category : News
Tags: css | css-purge | laravel | post-processing | tailwind-css

Laravel Tailwind Purge PostProcessor – Include classes in PHP file


I am using a form builder package which keeps the classes in the PHP files (see below one example).

However purge is removing these css classes thus they are not applying.

Trying to work if you can can regex a php file as the data is all as follows

Arrays like below..

'label_class' => 'ml-2 block text-sm text-gray-900 capitalize',
'field_class' => 'h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded'

My (current, not working) config.

mode: "jit",
purge: [
    "./resources/**/*.blade.php",
    "./resources/**/*.js",
    "./resources/**/*.vue",
    "./app/Forms/Auth/LoginForm.php",
],

Any help much appreciated

Source: CSS – Stack Overflow

September 2, 2021
Category : News
Tags: css | css-purge | laravel | post-processing | tailwind-css

Leave a Reply

Your email address will not be published. Required fields are marked *

Sitemap | Terms | Privacy | Cookies | Advertising

Senior Software Developer

Creator of @LzoMedia I am a backend software developer based in London who likes beautiful code and has an adherence to standards & love's open-source.