You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note the missing a = 1 assignment in build.js.
Running node build.js prints undefined, when it should print 1. ❌
For context: the React development build hosted on esm.sh (https://esm.sh/react@17.0.2?dev) includes a variable re-declaration resulting in Uncaught TypeError: _a is undefined when running the built code.
The text was updated successfully, but these errors were encountered:
pcattori
changed the title
esbuild --bundle omits variable assignment if variable is later redeclared
esbuild --bundle omits variable assignment if variable is redeclared
Mar 12, 2022
pcattori
changed the title
esbuild --bundle omits variable assignment if variable is redeclaredesbuild --bundle omits variable assignment if variable is redeclared
Mar 12, 2022
esbuild version: 0.14.25
example.js
:Running
node example.js
prints1
. ✅Running
esbuild example.js --bundle --outfile=build.js
produces:Note the missing
a = 1
assignment inbuild.js
.Running
node build.js
printsundefined
, when it should print1
. ❌For context: the React development build hosted on
esm.sh
(https://esm.sh/react@17.0.2?dev
) includes a variable re-declaration resulting inUncaught TypeError: _a is undefined
when running the built code.The text was updated successfully, but these errors were encountered: