Closed tom-sherman closed 1 year ago
It's fixed by moving the "use client"
to the top of the module
FWIW it's already at the top of the entry file:
But something (ParcelJS bundler?) is moving it to nearly the bottom of the bundled file.
Basically I need to solve this problem:
I could add a post-processing step, but I think this would break source maps. I'm not sure how to hook into Parcel's build cycle to do this, and I don't see any related issues on GitHub.
Suggestions welcome!
Filed https://github.com/parcel-bundler/parcel/issues/9050 asking for direction.
Let's see if 82dc8cd helps for now. Hopefully someone will weigh in on the Parcel issue with a better approach.
Published as 4.0.5
Note that 4.0.7 has a better solution in place for this.
react-error-boundary
version: 4.0.4node
version: 18.13.0pnpm
version: 8.2.0Relevant code or config
What you did:
Tried to render an error boundary inside a server component
What happened:
Got a build error
Reproduction repository:
https://github.com/tom-sherman/rsc-error-boundary-bug
Problem description:
Suggested solution: