Packages

esbuild

0.28.2 · 8 Aug 2026MIT439.7M / weekRepositoryHomepagenpmAtom feed

Your version

0.14.23

18 Feb 2022Where it was published

0.28.2 is the newest release of 0.14.x.

In short

2 changed

Security

1 advisory affects 0.14.23

Release note

  • Update feature database to indicate that node 16.14+ supports import assertions

    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

    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.

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.