npm esbuild 0.8.20
v0.8.20

latest releases: 0.21.3, 0.21.2, 0.21.1...
3 years ago
  • Fix an edge case with class body initialization

    When bundling, top-level class statements are rewritten to variable declarations initialized to a class expression. This avoids a severe performance pitfall in Safari when there are a large number of class statements. However, this transformation was done incorrectly if a class contained a static field that references the class name in its own initializer:

    class Foo {
      static foo = new Foo
    }

    In that specific case, the transformed code could crash when run because the class name is not yet initialized when the static field initializer is run. Only JavaScript code was affected. TypeScript code was not affected. This release fixes this bug.

  • Remove more types of statements as dead code (#580)

    This change improves dead-code elimination in the case where unused statements follow an unconditional jump, such as a return:

    if (true) return
    if (something) thisIsDeadCode()

    These unused statements are removed in more cases than in the previous release. Some statements may still be kept that contain hoisted symbols (var and function statements) because they could potentially impact the code before the conditional jump.

Don't miss a new esbuild release

NewReleases is sending notifications on new releases.