Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A setting to disable the React error overlay #9738

Open
LoganDark opened this issue May 24, 2024 · 7 comments
Open

A setting to disable the React error overlay #9738

LoganDark opened this issue May 24, 2024 · 7 comments
Labels
HMR Hot Module Reloading React Fast Refresh

Comments

@LoganDark
Copy link

The Parcel error overlay freezes our app for about 10 seconds every time there's an error, which is a constant annoyance and significantly slows down development. It looks like there are no settings to control it whatsoever.

I would like to be able to turn the error overlay off. I don't need the app to be parsing source maps for 10 seconds every time an error occurs - DevTools does that for me.

@hunxjunedo
Copy link

This is an enhancement and new feature, which requires discussion with the maintainers: @devongovett @mischnic

@LoganDark
Copy link
Author

This is an enhancement and new feature

Perfectly fine by me. I did click the new feature button, but I guess since it doesn't assign any labels that wasn't obvious.

@LoganDark
Copy link
Author

image

@hunxjunedo
Copy link

Damn that looks like a real mess, but still starting to work on this without consulting isn't a good idea.

@LoganDark
Copy link
Author

Damn that looks like a real mess, but still starting to work on this without consulting isn't a good idea.

Yeah, don't worry, I'm fine waiting for the maintainers' input. That wasn't intended as a nag, just to show how bad the issue is (it slows testing down by a factor of 2-3x just because I have to sit and wait between every click). A lot of these errors are unrelated to what I'm doing since other people are working on large refactors, so that's why I haven't just fixed them myself.

@LoganDark
Copy link
Author

LoganDark commented Jun 9, 2024

it's possible to use the debugger to get the overlay to STFU. set a conditional breakpoint that overwrites require:

image

void (require = ((require) => (module) => (console.log('require(%o)', module), module) === 'e88bec6ec2bff47' ? { setEditorHandler: () => {}, startReportingRuntimeErrors: () => {}, dismissRuntimeErrors: () => {} } : require(module))(require))

if it doesn't fire, replace e88bec6ec2bff47 with whatever is the second log to the console here: image

no more 15-second freezes for everything (even errors caught by error boundaries) !!!!!

@mischnic mischnic added HMR Hot Module Reloading React Fast Refresh labels Jul 1, 2024
@LoganDark
Copy link
Author

@mischnic do you have any thoughts on this? would you accept a PR? we're still impacted by this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HMR Hot Module Reloading React Fast Refresh
Projects
None yet
Development

No branches or pull requests

3 participants