npm esbuild 0.17.3
v0.17.3

latest releases: 0.21.4, 0.21.3, 0.21.2...
16 months ago
  • Fix incorrect CSS minification for certain rules (#2838)

    Certain rules such as @media could previously be minified incorrectly. Due to a typo in the duplicate rule checker, two known @-rules that share the same hash code were incorrectly considered to be equal. This problem was made worse by the rule hashing code considering two unknown declarations (such as CSS variables) to have the same hash code, which also isn't optimal from a performance perspective. Both of these issues have been fixed:

    /* Original input */
    @media (prefers-color-scheme: dark) { body { --VAR-1: #000; } }
    @media (prefers-color-scheme: dark) { body { --VAR-2: #000; } }
    
    /* Old output (with --minify) */
    @media (prefers-color-scheme: dark){body{--VAR-2: #000}}
    
    /* New output (with --minify) */
    @media (prefers-color-scheme: dark){body{--VAR-1: #000}}@media (prefers-color-scheme: dark){body{--VAR-2: #000}}

Don't miss a new esbuild release

NewReleases is sending notifications on new releases.