rspack icon indicating copy to clipboard operation
rspack copied to clipboard

[Bug]: Minimizing CSS using lightningcss may shuffle the CSS property order

Open matthiask opened this issue 1 year ago • 0 comments

System Info

System: OS: Linux 6.10 Fedora Linux 40 (Workstation Edition) CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11700F @ 2.50GHz Memory: 54.73 GB / 62.62 GB Container: Yes Shell: 5.2.26 - /bin/bash Binaries: Node: 20.12.2 - /usr/bin/node Yarn: 4.4.1 - /usr/bin/yarn npm: 10.5.0 - /usr/bin/npm pnpm: 9.0.6 - /usr/bin/pnpm

Details

This is more of a heads up since it's actually a bug in lightningcss tracked here: https://github.com/parcel-bundler/lightningcss/issues/805

The report over there also contains a reproduction. I'm opening this issue with the goal of raising awareness about this issue, and also to ask if the option exists to bring the SWC CSS minimizer back.The SWC minimizer seems to be a bit more conservative which makes breakages such as this one less likely. Of course fixing lightningcss would probably be even better... :-)

Also, having an issue in the rspack repository may help others who are running into the same problem.

The bug was introduced between 0.7.5 and 1.0.0-alpha.0.

Reproduce link

No response

Reproduce Steps

A minimal lightningcss reproduction case is mentioned in the lightning CSS issue: https://github.com/parcel-bundler/lightningcss/issues/805

matthiask avatar Sep 18 '24 11:09 matthiask