forge icon indicating copy to clipboard operation
forge copied to clipboard

Unable to override webpack-dev-server client.overlay configuration for renderer process

Open kbuzby opened this issue 2 years ago • 2 comments

Pre-flight checklist

  • [X] I have read the contribution documentation for this project.
  • [X] I agree to follow the code of conduct that this project uses.
  • [X] I have searched the issue tracker for a bug that matches the one I want to file, without success.

Electron Forge version

6.2.1

Electron version

25.2.0

Operating system

macOS

Last known working Electron Forge version

No response

Expected behavior

Override webpack devServer.client.overlay config

Actual behavior

Adding

devServer: {
    client: {
      overlay:  false
    }
  }

to webpack.renderer.config.ts has no effect at runtime - I continue to get overlay errors with this configuration set.

Steps to reproduce

  1. electron-forge project with webpack-typescript template + add react capability
  2. trigger a runtime error in the renderer code a. I have been getting this in project after configuring a two panel layout with react-split and react-monaco-editor in the right pane (without automaticLayout: true). Running the application and using the resizable divider leads to "ResizeObserver loop limit detected" runtime error. From what I can tell this is benign (which is wanted to suppress this error).
  3. still observe the overlay for runtime error despite configuring it to not show. I've also observed this in the various forms of trying to disable the error (overlay: { runtimeErrors: false }, overlay: { runtimeErrors: (error) => {...} })

Additional information

This seems potentially related to #2599

kbuzby avatar Jun 28 '23 12:06 kbuzby

I am also affected by this problem. I solved it by adding a CSS rule to my page that just sets display: none on the iframe that Webpack injects for the overlay.

#webpack-dev-server-client-overlay {
    display: none;
}

szszoke avatar Mar 23 '24 13:03 szszoke

try, this works for me

devServer: {
  client: {
    overlay: {
      errors: false,
      warnings: false
    }
}

Keller18306 avatar Aug 13 '24 23:08 Keller18306