Separate removeConsole and consoleType Props for Better Environment Control #4822
basit-qayoom
started this conversation in
Ideas
Replies: 3 comments
-
This is a breaking change and we have no plan to separate it. Do you need to use |
Beta Was this translation helpful? Give feedback.
0 replies
-
The requirement is to display only console errors in the production environment, while allowing all other console logs in non-production environments. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description:
Currently, the removeConsole option in the performance settings allows either a boolean (true/false) to remove all console logs or an array of specific console methods to remove. However, this approach has limitations when configuring different environments (e.g., keeping console.error in production but removing others).
Proposed Solution:
Introduce a separate consoleType prop, allowing removeConsole to remain a strict boolean toggle (true/false), while consoleType controls which console methods to remove.
Beta Was this translation helpful? Give feedback.
All reactions