Minify Class Names at Blade Views and CSS/JS

The Goal is to convert HTML class names at Blade views from long to short and, at the same time do the same action at CSS/JS.

Example:
Source:

Blade:

<div class="main-section">
  <span class="main-section-text">{{$content}}</span>
</div>

CSS:

.main-section { color: red; }
.main-section .main-section-text { color: blue; }

JS:

$('.main-section')

Convert to:

Blade:

<div class="a">
  <span class="a-b">{{$content}}</span>
</div>

CSS:

.a { color: red; }
.a .a-b{ color: blue; }

JS:

$('.a')

I have found a few solutions, but no one for me doesn’t look clear.

Could you please recommend the right lib or solution for that?

Examples:

I have found the next Class Name obfuscation solution, like an option for tailwind https://medium.com/geekculture/obfuscate-tailwind-classes-in-a-laravel-project-71694b9d8ac1