Skip to content

v0.12.22

Compare
Choose a tag to compare
@github-actions github-actions released this 21 Aug 02:32
  • Make HTTP range requests more efficient (#1536)

    The local HTTP server built in to esbuild supports range requests, which are necessary for video playback in Safari. This means you can now use <video> tags in your HTML pages with esbuild's local HTTP server.

    Previously this was implemented inefficiently for files that aren't part of the build, but that are read from the underlying fallback directory. In that case the entire file was being read even though only part of the file was needed. In this release, only the part of the file that is needed is read so using HTTP range requests with esbuild in this case will now use less memory.

  • Fix CSS minification bug with box-shadow and var() (#1538)

    The box-shadow property can be specified using 2, 3, or 4 numbers. The 3rd and 4th numbers are the blur radius and spread radius, and can be omitted if zero. When minifying, esbuild has an optimization that removes trailing zeros from runs of numbers within the box-shadow property. However, that optimization is not correct in the presence of tokens that are neither a number, a color, nor the token insert. These edge cases include var() or calc() tokens. With this release, esbuild will now do stronger validation and will only remove trailing zeros if the contents of the box-shadow property matches the underlying CSS grammar exactly.

    /* Original code */
    button {
      box-shadow: 0 0 0 var(--spread) red;
    }
    
    /* Old minified output */
    button{box-shadow:0 0 var(--spread) red}
    
    /* New minified output */
    button{box-shadow:0 0 0 var(--spread) red}