npm esbuild 0.25.11
v0.25.11

one day ago
  • Add support for with { type: 'bytes' } imports (#4292)

    The import bytes proposal has reached stage 2.7 in the TC39 process, which means that although it isn't quite recommended for implementation, it's generally approved and ready for validation. Furthermore it has already been implemented by Deno and Webpack. So with this release, esbuild will also add support for this. It behaves exactly the same as esbuild's existing binary loader. Here's an example:

    import data from './image.png' with { type: 'bytes' }
    const view = new DataView(data.buffer, 0, 24)
    const width = view.getInt32(16)
    const height = view.getInt32(20)
    console.log('size:', width + '\xD7' + height)
  • Lower CSS media query range syntax (#3748, #4293)

    With this release, esbuild will now transform CSS media query range syntax into equivalent syntax using min-/max- prefixes for older browsers. For example, the following CSS:

    @media (640px <= width <= 960px) {
      main {
        display: flex;
      }
    }

    will be transformed like this with a target such as --target=chrome100 (or more specifically with --supported:media-range=false if desired):

    @media (min-width: 640px) and (max-width: 960px) {
      main {
        display: flex;
      }
    }

Don't miss a new esbuild release

NewReleases is sending notifications on new releases.