npm esbuild 0.27.7
v0.27.7

latest release: 0.28.0
6 hours ago
  • Fix lowering of define semantics for TypeScript parameter properties (#4421)

    The previous release incorrectly generated class fields for TypeScript parameter properties even when the configured target environment does not support class fields. With this release, the generated class fields will now be correctly lowered in this case:

    // Original code
    class Foo {
      constructor(public x = 1) {}
      y = 2
    }
    
    // Old output (with --loader=ts --target=es2021)
    class Foo {
      constructor(x = 1) {
        this.x = x;
        __publicField(this, "y", 2);
      }
      x;
    }
    
    // New output (with --loader=ts --target=es2021)
    class Foo {
      constructor(x = 1) {
        __publicField(this, "x", x);
        __publicField(this, "y", 2);
      }
    }

Don't miss a new esbuild release

NewReleases is sending notifications on new releases.