parcel-bundler / parcel

The zero configuration build tool for the web. 📦🚀
https://parceljs.org
MIT License
43.38k stars 2.27k forks source link

A setting to disable the React error overlay #9738

Open LoganDark opened 4 months ago

LoganDark commented 4 months ago

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 commented 4 months ago

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

LoganDark commented 4 months ago

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 commented 4 months ago

image

hunxjunedo commented 4 months ago

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

LoganDark commented 4 months ago

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 commented 3 months ago

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) !!!!!

LoganDark commented 1 month ago

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

kai-dorschner-twinsity commented 2 weeks ago

Bump