trunk-rs / trunk

Build, bundle & ship your Rust WASM application to the web.

Home Page:https://trunkrs.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Minification is breaking CSS

Mubelotix opened this issue · comments

The last trunk update broke our website in production for Safari 15 and 16 users, accounting for 10% of our userbase.

We are not completely sure what the issue was, but the site looked exactly as if all media queries were completely removed.
My code won't help you reproducing the bug because only the frontend is open-source, but you can take a look at our css if that helps (located in the subfolders in src).

Along with #750, I would like to make the case for turning minification off by default. Stability matters most

Thank you for your work on trunk

Along with #750, I would like to make the case for turning minification off by default. Stability matters most

Yes and no. I agree with that in general. On the other side, without having a proper understanding of the issue, it's hard to make any decision. I can't take a look at all the different projects and their issues though. And as mentioned in #750, trunk is only orchestrating calls to other tools, implementing minification in this case. So creating an upstream bug on those does make sense too. And I assume for that I does require a reproducer, because other projects also don't have the bandwidth to inspect individual user's projects.

I am not pushing back on disabling minification by default for the next release, assuming someone does the work in a consistent way (including the docs stuff). But it seems to work for others and there is a switch for cases where it does not.

I am closing this one, as it's not directly a trunk issue. And minification defaults will change in 0.20.0.