npm esbuild 0.14.23
v0.14.23

latest releases: 0.24.0, 0.23.1, 0.23.0...
2 years ago
  • Update feature database to indicate that node 16.14+ supports import assertions (#2030)

    Node versions 16.14 and above now support import assertions according to these release notes. This release updates esbuild's internal feature compatibility database with this information, so esbuild no longer strips import assertions with --target=node16.14:

    // Original code
    import data from './package.json' assert { type: 'json' }
    console.log(data)
    
    // Old output (with --target=node16.14)
    import data from "./package.json";
    console.log(data);
    
    // New output (with --target=node16.14)
    import data from "./package.json" assert { type: "json" };
    console.log(data);
  • Basic support for CSS @layer rules (#2027)

    This adds basic parsing support for a new CSS feature called @layer that changes how the CSS cascade works. Adding parsing support for this rule to esbuild means esbuild can now minify the contents of @layer rules:

    /* Original code */
    @layer a {
      @layer b {
        div {
          color: yellow;
          margin: 0.0px;
        }
      }
    }
    
    /* Old output (with --minify) */
    @layer a{@layer b {div {color: yellow; margin: 0px;}}}
    
    /* New output (with --minify) */
    @layer a.b{div{color:#ff0;margin:0}}

    You can read more about @layer here:

    Note that the support added in this release is only for parsing and printing @layer rules. The bundler does not yet know about these rules and bundling with @layer may result in behavior changes since these new rules have unusual ordering constraints that behave differently than all other CSS rules. Specifically the order is derived from the first instance while with every other CSS rule, the order is derived from the last instance.

Don't miss a new esbuild release

NewReleases is sending notifications on new releases.