next.js
47b9fc61 - Turbopack: Allow ESM externals in SSR (#70258)

Commit
1 year ago
Turbopack: Allow ESM externals in SSR (#70258) Closes PACK-3244 Closes https://github.com/vercel/next.js/issues/69562 Await the module in both environments (SSR/browser), if it's async in at least one of them. We can't and don't want to make the browser module async (artifically) if the SSR module is async (due to ESM externals). The only concern regarding `async` not always being true in the manifest was that we don't want to await in non TLA cases (e.g. CJS exporting a promise, etc...). But the SSR module being ESM with TLA and the browser module being CJS with a Promise export is exceedingly unlikely.
Author
Parents
Loading