Currently, the experimental.useWasmBinary option is ignored when doing a next build, because SWC transpilation never sets the useWasmBinary parameter in loadBindings. I tried passing the option everywhere loadBindings is called but this was getting very cumbersome so I opted to read the option at the top of loadBindings, and, if it's set, set useWasmBinary to true.
I don't know if there's a better way to load the options for this, and I'll gladly change this is there is.
Fixes #62059
Currently, the
experimental.useWasmBinary
option is ignored when doing anext build
, because SWC transpilation never sets theuseWasmBinary
parameter inloadBindings
. I tried passing the option everywhereloadBindings
is called but this was getting very cumbersome so I opted to read the option at the top ofloadBindings
, and, if it's set, setuseWasmBinary
to true.I don't know if there's a better way to load the options for this, and I'll gladly change this is there is.
Another related issue which prevented this option from working has already been fixed in https://github.com/vercel/next.js/pull/65633.