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
429 stars 9 forks source link

Qwik double build generates empty css file when mangling is enabled #266

Closed Machy8 closed 7 months ago

Machy8 commented 1 year ago

Describe the bug

.

Reproduction

.

Logs

No response

System Info

.
petersrule commented 1 year ago

Yes this is a big problem. It used to just generate an empty CSS file (global.css). Then I turned off the mangling(mangleSelectors: false) in the compiler and then it worked for a while, and then it started just messing up the CSS file referenced above so it didn't work anymore. now it the Qwik dev server won't get started fully to serve files. I think I will have to go back to Tailwind.

For more understanding, the issue often happened when I changed a class in the TSX file.

=> class="margin:0_2rem"

It was that class or adding the class attribute to the HTML element or changing the class.

Machy8 commented 1 year ago

Hi @petersrule, do you have any other configuration? Like matching/ignore areas? I will look into it. I though, this is caused randomly, but it seems it's not.

petersrule commented 1 year ago

I just have the standard Qwik config shown on the website. I really like Stylify but it is a pain reposting the correct css file data every few minutes. Any help is wanted so I don’t have to go back to tailwind.

I agree it didn’t feel random. It seemed to happen every time I changed the returned html in the tsx, more specifically the classes on an element.

On Fri, Oct 27, 2023 at 1:08 AM Vladimír Macháček @.***> wrote:

Hi @petersrule https://github.com/petersrule, do you have any other configuration? Like matching/ignore areas? I will look into it. I though, this is caused randomly, but it seems it's not.

— Reply to this email directly, view it on GitHub https://github.com/stylify/packages/issues/266#issuecomment-1782484694, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACP6SWWYT7K22GWW3EZHWZLYBNTYTAVCNFSM6AAAAAA2VQC5MKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBSGQ4DINRZGQ . You are receiving this because you were mentioned.Message ID: @.***>

Machy8 commented 7 months ago

@petersrule Hi, I am not sure if you still use Stylify but in case you do:

Drop the Unplugin. Add bundler into vite config https://stylifycss.com/en/docs/get-started/bundling-files.

In case you want to split those tasks, run paralel tasks with concurrently like here https://stylifycss.com/en/docs/integrations/remix/

I have been thinking about plugins and integrations and I don't think, it's the right way. So I am dropping them all in favor of bundler.

The longer why: https://github.com/stylify/packages/discussions/274