vercel / next.js

The React Framework
https://nextjs.org
MIT License
122.91k stars 26.28k forks source link

fix(next-swc): always set `useWasmBinary` based on config in `loadBindings` - fixes #62059 #67420

Open obiwac opened 2 days ago

obiwac commented 2 days ago

Fixes #62059

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.

Another related issue which prevented this option from working has already been fixed in https://github.com/vercel/next.js/pull/65633.

ijjk commented 2 days ago

Allow CI Workflow Run

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer