Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option for inlining typeof window (#8211)
### Description In Next.js with webpack we have a feature to inline `typeof window` in server/client environments. That allows e.g. ``` "use client" if(typeof window === 'undefined') { import('server-only-package') } ``` Today with Turbopack above code causes `server-only-package` to still be loaded in the browser compilation. Which causes issues like vercel/next.js#66058 where the `if`/`else` condition is used to use different modules for server and client. This change is required to pass the test in vercel/next.js#66058 Pushing up the Next.js changes in that PR. <!-- ✍️ Write a short summary of your work. If necessary, include relevant screenshots. --> ### Testing Instructions <!-- Give a quick description of steps to test your changes. --> --------- Co-authored-by: Donny/강동윤 <[email protected]>
- Loading branch information