[Bug]: viewTransition Page example codes doesn't working correctly "Bun"
Summary
All example codes preview is broken. Probably bun missing package error. According to https://bun.com/docs/runtime/nodejs-compat#node%3Acrypto has crypto compabilt on it. Maybe not using correct version of Bun.
Page
https://react.dev/reference/react/ViewTransition
Details
We are now getting a new error with the stream package:
Cannot find module 'stream' from '/node_modules/react-dom/cjs/react-dom-server.bun.development.js'
It shouldn't be using the bun version at all?
Works when you fork the sandbox, seems like it's probably another codesandbox versioning issue @CompuIves?
Yes, could be a resolver problem. Taking a look.
Okay, I have a theory and a fix. Deploying the fix now.
@CompuIves you rock
So the dependency resolver that we use for React Docs was not aware of bun at all in handling exports, so it included it in the bundle, which was then transpiled in the frontend. Since the transpiler couldn't determine where stream or crypto came from (regardless of whether we would execute the file), it threw early. I have now updated our resolver to not include these versions in the bundle, only the browser version. We have a pretty heavy cache, and I cannot cache bust unfortunately because I don't have direct access to the domain, but it should automatically work when a new canary version of react-dom comes up.
Ok perfect, I'll check tomorrow after the nightly and close this!