github evanw/esbuild v0.11.2

latest releases: v0.21.5, v0.21.4, v0.21.3...
3 years ago
  • Fix missing symbol dependency for wrapped ESM files (#1086)

    An internal graph node was missing an edge, which could result in generating code that crashes at run-time when code splitting is enabled. Specifically a part containing an import statement must depend on the imported file's wrapper symbol if the imported file is wrapped, regardless of whether it's a wrapped CommonJS or ESM file. Previously this was only the case for CommonJS files but not for ESM files, which is incorrect. This bug has been fixed.

  • Fix an edge case with entry points and top-level await

    If an entry point uses import() on itself, it currently has to be wrapped since import() expressions call the wrapper for the imported file. This means the another call to the wrapper must be inserted at the bottom of the entry point file to start the lazy evaluation of the entry point code (otherwise nothing will be evaluated, since the entry point is wrapped). However, if this entry point then contains a top-level await that means the wrapper is async and must be passed to await to catch and forward any exceptions thrown during the evaluation of the entry point code. This await was previously missing in this specific case due to a bug, but the await should now be added in this release.

Don't miss a new esbuild release

NewReleases is sending notifications on new releases.