I have been functioning on a challenge with Subsequent.js since past month and applied the console.log statement in lots of components & files even although I you should not keep in mind. Commonly, we use it to test API responses and some other regions of the software.
Generating console statements general public is not a very good thought at all, it may convey your app at a safety danger. Checking each file, and deleting the statement is really time-consuming & monotonous also. As a developer, we all loathe tedious tasks so, in the write-up below we focus on how you can say goodbye to console.log in your Following.js application from the Generation surroundings in just fewer than 1 moment.
Seems very good! let us goooo…😎
👉 Observe the measures described below –
1. Set up the
babel-plugin-rework-remove-console package as a progress dependency.
2. Develop a .babelrc file at the root of your undertaking, copy the below written content & that’s all.
"presets": [ "next/babel" ], "env": "manufacturing": "plugins": [ "transform-remove-console" ]
🏁 This is just a brief trick that I employed to increase my productivity, even you should use it following time.
I will maintain sharing far more recommendations & tips relevant to web dev,continue to be tuned!.
Thanks for reading.