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
I am observing that esbuild is emitting the invalid code shown below. h3 corresponds to useRef and o3 corresponds to currentHook from preact/hooks: https://github.com/preactjs/preact/blob/3017d91a69f1b52bb89be118e22f4778cb82dd02/hooks/src/index.js#L175. It seems esbuild is choosing to split off currentHook into a separate chunk even though its value is reassigned in useRef. I am using esbuild v0.6.11 and the bundle and splitting flags.
Thank you so much for reporting this. This is a really good test case. I've fixed this issue and the fix will be in the next release. I wrote up some more information about this bug in the release notes.
I am observing that esbuild is emitting the invalid code shown below.
h3
corresponds touseRef
ando3
corresponds tocurrentHook
frompreact/hooks
: https://github.com/preactjs/preact/blob/3017d91a69f1b52bb89be118e22f4778cb82dd02/hooks/src/index.js#L175. It seems esbuild is choosing to split offcurrentHook
into a separate chunk even though its value is reassigned inuseRef
. I am using esbuild v0.6.11 and thebundle
andsplitting
flags.The text was updated successfully, but these errors were encountered: