I need to keep console output clean in production mode, but i need logs for development. What compiler options or tsc's cli options can help me with that?
P.S. I'm using just tsc --build
for build in production mode
This is not possible to do with the TypeScript compiler. According to Ryan Cavanaugh (the development lead of the TypeScript team):
Lots of tools available that don't need a type system or complex downleveling to accomplish this; we're not trying to be a Swiss Army Knife
Your best option is to use some other tool to accomplish this task.