So, while I understand your aggravation, the issue here is that Bubble minifies your plugin’s code using Google’s closure compiler, but doesn’t offer us any way to set various options for closure compiler (which is a pretty complex bit of software).
Additionally, it’s not clear what version of closure compiler is in use.
So, if your code – for whatever reason – causes closure compiler to choke, you’ll wind up with this $jscomp is not defined
error when you run your plugin. (The presence of this error means that closure compiler failed to compile/minify your code.)
And we don’t know what exactly caused closure to choke (because we don’t see its output), so all we can do is guess as to what the issue might be. Further, we can’t call closure with some different options set or whatever – we just have to accept Bubble’s defaults.
So: Your only fix is to tell Bubble not to compile your code. You do this by setting window.do_not_minify_plugin
to true via the console while you’re in the plugin builder.
Now, of course, this is stupid because you probably do want your code minified. But of course you can do that yourself.
I have exactly the above situation with my List Shifter and Calendar Grid Pro plugins. (The issue in both of those cases is with my use of async / await in those. There’s nothing fancy, but there’s some flag that needs to be set for closure, OR the version of closure that Bubble uses is bugged. [I actually think the source of the problem is the latter – there’s specifically an issue with certain versions of closure and async/await that is fixed in later versions.]
And while it would be nice if those plugs could compile using closure, I’ve actually gotten used to minifying them myself with uglify (I generally just do it online using: https://skalman.github.io/UglifyJS-online/) and since I do it myself, I have control over what, exactly, happens during minification/optimization.
That’s useful because in addition to List Shifter not compiling due to async/await, there are certain variables that I need to keep the names of, even after minification or else a couple of important List Shifter features will not work (mostly the eval(x) operator in PROCESS List and the “debug” feature of PROCESS List)… And, of course, there’s no way for me to tell Bubble’s closure module that these variables are “reserved words” and must not be minified/changed/mangled.
For more on this type of thing and how I manage complex plugin development in Bubble, see my video here: Live Bubbling with @keith: Managing Complex Bubble Plugin Development, How Plugin Element/Action IDs Work (and How to Change Them), GitHub Sync and File System Case Sensitivity