I have a project which uses a library that has the ability to use sound. I want to set a flag so that the HowlerJS code is not included in the final JS output. I thought it could work by setting up a define in the project.xml and then putting conditionals wherever my sound classes might be used.
<define name="silentMode" /> //and then elsewhere: #if !silentMode addSubCommand( InitPageSoundsCommand ); #end
Even with full DCE and -final enabled I’m still seeing HowlerJS code in the final file. The extra kilobytes aren’t a huge deal, but I can hear feedback in my speakers because Howler is opening a sound channel for playback. Any ideas? Am I just not applying the conditional compilation in all the right places?