How to include code for a debug build?

Hello all,
Part of my code is for debugging purpose that is not needed in the release build.
Is there an option to identify which build is taking place (debug Vs. release ) and ignore/disable part of the code?

Thank you,


IONIC_ENV	Value can be either prod or dev.

For example:

const env = process.env.IONIC_ENV;

if (env === 'prod') {


Than you for quick respond.
I’ll do the reading.