I would like to know in my typescript file (spfx) if i am currently running gulp serve
or gulp build
.
for example in C# there is something like
#if DEBUG
// debug stuff goes here
#else
// release stuff goes here
#endif
How do i achieve something similar for my gulp/spfx/TS, meaning while in TS inside my component, to split my code in case its serve
or build
?
As far as researched i saw you can make all kinds of enviorment variables for NODE but not for the typescript files.