-
Fix a discrepancy with esbuild's
tsconfig.json
implementation (#913)If a
tsconfig.json
file contains a"baseUrl"
value and"extends"
anothertsconfig.json
file that contains a"paths"
value, the base URL used for interpreting the paths should be the overridden value. Previously esbuild incorrectly used the inherited value, but with this release esbuild will now use the overridden value instead. -
Work around the Jest testing framework breaking node's
Buffer
API (#914)Running esbuild within a Jest test fails because Jest causes
Buffer
instances to not be consideredUint8Array
instances, which then breaks the code esbuild uses to communicate with its child process. More info is here: jestjs/jest#4422. This release contains a workaround that copies eachBuffer
object into aUint8Array
object when this invariant is broken. That should prevent esbuild from crashing when it's run from within a Jest test. -
Better handling of implicit
main
fields inpackage.json
If esbuild's automatic
main
vs.module
detection is enabled forpackage.json
files, esbuild will now useindex.js
as an implicitmain
field if themain
field is missing butindex.js
is present. This means if apackage.json
file only contains amodule
field but not amain
field and the package is imported using both an ESMimport
statement and a CommonJSrequire
call, theindex.js
file will now be picked instead of the file in themodule
field.