leptos-rs / cargo-leptos

Build tool for Leptos (Rust)
MIT License
315 stars 88 forks source link

Specify browser targets in minify step #194

Closed prscoelho closed 8 months ago

prscoelho commented 8 months ago

Use target browsers in minify step.

A few months ago I ran into an issue, when compiling in release mode, where some css rules were wrongly merging together, resulting in broken css in firefox. I thought the issue was in lightningcss and reported it there at the time, and now it seems the issue has been fixed on that side.

However I tested with latest lightningcss and the issue persisted, so it seemed like the only way this was happening was if the targets weren't being correctly passed in the minify step and lo and behold that was indeed what was happening. I also tried only the code change without bumping lightningcss and that was not enough to generate correct css.

With both passing targets and bumping lightningcss, the css generated correctly.