brisa-build / brisa

The Web Platform Framework.
https://brisa.build
MIT License
449 stars 12 forks source link

allow to disable some dev errors to avoid modal disturbance #515

Closed aralroca closed 1 month ago

aralroca commented 1 month ago

Allow to disable some dev errors to avoid modal disturbance. Sometimes using libraries you can have errors that appear in the modal during dev but are not solvable by the client and the modal is more annoying than helpful. For these cases, it would be nice to be able to define which errors you want to ignore, example of use:

https://stackoverflow.com/questions/76187282/react-resizeobserver-loop-completed-with-undelivered-notifications/77914968#77914968

Proposal by: @enzonotario

aralroca commented 1 month ago

Example on Webpack https://github.com/webpack/webpack-dev-server/issues/4777

https://github.com/malcolm-kee/webpack-dev-server/blob/f7386f60da170b158d13a2c41cc668f0b83d9679/client-src/index.js#L50-L54

It seems that there is no other way than passing the function in string and executing it on the client. The downsides of this:

If this is the only option, we can do it this way. I will investigate a little bit to see if there is the possibility to separate inside brisa.config.ts the client code with server code to make a bundle of this. It would also solve the i18n formatters in the client.