/client/compatibility folder in production mode

In my /client/compatibility folder I have JS file with some functions responsible for app UI app init(sidebar toggle etc.). It’s worth to mention that it’s bought HTML theme, so it’s not so easy to replace this tile. When I was in develop mode putting this file in /client/compatibility folder was enough. Everything worked fine. Problems started when I deploy my app, or just run it in --production mode. Sidebar toggle, menu etc. stops work. I assume that it’s associated with Meteor file bundling. Does anyone faced something simillar?

I have several third party files in /client/compatibility and no problem in production. What is the error you see?

The problem is that my console is free of errors. It looks like the code doesn’t run, although I can find it in the minified JS file.