Skip to content

Ability to suppress console.warnsΒ #2117

@kislakiruben

Description

@kislakiruben

Is your feature request related to a problem? Please describe.
A lot of console warnings are logged to the browser's console when a registered bundle is not used on a loaded page.

We have a codebase where many React components are registered with ReactOnRails.register(), but not all the registered components are used on every page. The components which are not used on a particular page throw a warning in the browser's console to suggest cleaning them up. While I appreciate the intent behind having these messages during development, they're very noisy in production environments where one gets a ton of them.

Describe the solution you'd like
It would be nice to have the ability to turn off console logging via a configuration option or to suppress them automatically in production environments.

Describe alternatives you've considered
None

Additional context
None

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions