stylify / packages

💎 Monorepository for Stylify packages. Stylify uses CSS-like selectors to generate Extremely optimized utility-first CSS dynamically based on what you write 💎.
https://stylifycss.com
MIT License
424 stars 9 forks source link

Mangling should be turned off by default for unplugin and it's child packages #238

Closed Machy8 closed 1 year ago

Machy8 commented 1 year ago

Describe the problem

The mangling is not consistent while processed within the bundlers inner process.

It's because frameworks compile classes into their own structures jsx => 'objects', astro => 'random functions' and it's not reliable to match class attributes and macros during the compilation and trust frameworks their underlaying syntax will not change.

The only way to mangle classes right now is to mangle selectors directly within the files before build. It's more reliable and easier to debug. Becuase this process is done primarily for production purposes (within netlify/vercel/docker build), it should not effect local development that much.

This will also decrease the amount of surprise to beginners => "what happened to my html".

Describe the proposed solution

.

Alternatives considered

.

Importance

would make my life easier