Having trouble removing HowlerJS from final compilation

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?

Howler is one thing, but for slimming output, knowing how to conditionally compile without certain lib content would be dandy. In a perfect world, a lack of imports would spell a lack of included code.

For me, I hope HowlerJS is not included in the final code. In this regard, I usually directly restore the old version of tools.n HTML5 platform compilation.

I don’t like using npm to compile html5, because I always download extra npm libraries.