# \[Plugin Developer Feature\] Plugin Code Obfuscation

**URL:** <https://forum.bubble.io/t/plugin-developer-feature-plugin-code-obfuscation/274620>\
**Category:** New features\
**Created:** [July 27, 2023, 3:28pm UTC](https://forum.bubble.io/t/plugin-developer-feature-plugin-code-obfuscation/274620 "2023-07-27T15:28:07Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![leon.maksin](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/leon.maksin/32/137650_2.png) [@leon.maksin](https://forum.bubble.io/u/leon.maksin)\
**Post date:** [July 27, 2023, 3:28pm UTC](https://forum.bubble.io/t/plugin-developer-feature-plugin-code-obfuscation/274620/1 "2023-07-27T15:28:07Z")

</div>

Hi everyone,

We’re launching a new feature for plugin developers that will allow you to **obfuscate your plugin code** when publishing your plugin. This is an exciting new option that will provide developers publishing sensitive, client-facing code with a layer of protection.

We’re also going to, by default, minify all plugin code. This will cause slight performance improvements and hide developers’ comments and variable names from the public.

To obfuscate your plugin, simply publish a new plugin version like usual and mark the “Obfuscate client-facing code” checkbox.

[![](https://img.youtube.com/vi/nrgcVV5gxXE/maxresdefault.jpg "Plugin Obfuscation Video Tutorial") ](https://www.youtube.com/watch?v=nrgcVV5gxXE)

Please note:

- Obfuscation may make your plugin less performant
- All plugins and plugin versions published before today will maintain their unmodified format
- Open-source plugins will still have their source code available at the “see plugin code” button

Best of luck building plugins, and happy Bubbling 🙂

---

<div class="post-metadata">

**Author:** ![sudsy](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sudsy/32/114637_2.png) [@sudsy](https://forum.bubble.io/u/sudsy)\
**Post date:** [July 27, 2023, 3:39pm UTC](https://forum.bubble.io/t/plugin-developer-feature-plugin-code-obfuscation/274620/2 "2023-07-27T15:39:50Z")

</div>

Thanks, Leon. Eager to give it a go! A couple questions…

- Is there an increased chance of any issues if we publish already-minified code with the obfuscation option enabled? (My tooling automatically uses Terser when I “compile” my code. I can disable it, of course, but would like to know if I _ **should** _.)
- Can you confirm whether the `window.do_not_minify_plugin` flag is still functional or not? (I suspect not.)

Thanks for the clarification.

---

<div class="post-metadata">

**Author:** ![rico.trevisan](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/rico.trevisan/32/170176_2.png) [@rico.trevisan](https://forum.bubble.io/u/rico.trevisan)\
**Post date:** [July 27, 2023, 3:41pm UTC](https://forum.bubble.io/t/plugin-developer-feature-plugin-code-obfuscation/274620/3 "2023-07-27T15:41:41Z")

</div>

Nice, @keith will be happy.

It is a pity that I might lose the #1 source of learning material: other’s people easily-readable code.

---

<div class="post-metadata">

**Author:** ![leon.maksin](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/leon.maksin/32/137650_2.png) [@leon.maksin](https://forum.bubble.io/u/leon.maksin)\
**Post date:** [July 27, 2023, 3:45pm UTC](https://forum.bubble.io/t/plugin-developer-feature-plugin-code-obfuscation/274620/4 "2023-07-27T15:45:49Z")

</div>

Thanks for the questions! Your already-minified code should work just fine. We’ll minify it again with Terser so it may be redundant, but that shouldn’t cause any issues.

The `window.do_not_minify_plugin` flag has not been functional for a long time, since the minification scheme it affected has not worked for a while. Would a flag like this for the new scheme be helpful to you?

---

<div class="post-metadata">

**Author:** ![leon.maksin](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/leon.maksin/32/137650_2.png) [@leon.maksin](https://forum.bubble.io/u/leon.maksin)\
**Post date:** [July 27, 2023, 3:47pm UTC](https://forum.bubble.io/t/plugin-developer-feature-plugin-code-obfuscation/274620/5 "2023-07-27T15:47:37Z")

</div>

The source code will still be available for open source plugins, so don’t worry! We’re only minifying and obfuscating the published code that is sent to apps.

---

<div class="post-metadata">

**Author:** ![sudsy](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sudsy/32/114637_2.png) [@sudsy](https://forum.bubble.io/u/sudsy)\
**Post date:** [July 27, 2023, 3:48pm UTC](https://forum.bubble.io/t/plugin-developer-feature-plugin-code-obfuscation/274620/6 "2023-07-27T15:48:14Z")

</div>

Thanks! One quick follow-up (sorry to be such a nag)…

Does “obfuscation” include the method names (which have been easily discoverable with Chrome dev tools)?

And if so, are the method names obfuscated even if the code is not?

---

<div class="post-metadata">

**Author:** ![leon.maksin](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/leon.maksin/32/137650_2.png) [@leon.maksin](https://forum.bubble.io/u/leon.maksin)\
**Post date:** [July 27, 2023, 3:55pm UTC](https://forum.bubble.io/t/plugin-developer-feature-plugin-code-obfuscation/274620/7 "2023-07-27T15:55:11Z")

</div>

The external method name won’t be obfuscated, but method names inside the primary function will be. Would this cause any problems?

---

<div class="post-metadata">

**Author:** ![sudsy](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sudsy/32/114637_2.png) [@sudsy](https://forum.bubble.io/u/sudsy)\
**Post date:** [July 27, 2023, 4:02pm UTC](https://forum.bubble.io/t/plugin-developer-feature-plugin-code-obfuscation/274620/8 "2023-07-27T16:02:57Z")

</div>

> [@leon.maksin](#):
>
> Would this cause any problems?

I’ll have to give it a try and see, but if I understand what you’re saying, then **YES**.

It’s been drop-dead simple to duplicate plugins because of that. I have no idea how widespread the phenomenon is, but “plugin theft” has definitely occurred a number of times. (I’ve even seen a forum post by someone advertising they can duplicate any plugin for a fee!)

Needless to say, that impacts the bottom line of both the plugin dev and Bubble.

I’ll post back once I determined if the issue I’m concerned about still exists.

---

<div class="post-metadata">

**Author:** ![leon.maksin](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/leon.maksin/32/137650_2.png) [@leon.maksin](https://forum.bubble.io/u/leon.maksin)\
**Post date:** [July 27, 2023, 4:17pm UTC](https://forum.bubble.io/t/plugin-developer-feature-plugin-code-obfuscation/274620/9 "2023-07-27T16:17:44Z")

</div>

If I’m understanding you correctly, this is a problem that plugin obfuscation can’t really solve. Obfuscated code still needs to function, so someone can copy paste an action into a private plugin, sure. But someone will only be able to steal that exact functionality, which will be in an obfuscated, unreadable state. This will also make blatant piracy easier to detect on our end.

All client-facing code on the internet is generally public domain, but one of the best protections one _can_ put in place is obfuscation.

---

<div class="post-metadata">

**Author:** ![bubble.trouble](https://avatars.discourse-cdn.com/v4/letter/b/7ba0ec/32.png) [@bubble.trouble](https://forum.bubble.io/u/bubble.trouble)\
**Post date:** [July 27, 2023, 4:19pm UTC](https://forum.bubble.io/t/plugin-developer-feature-plugin-code-obfuscation/274620/10 "2023-07-27T16:19:44Z")

</div>

![Screenshot 2023-07-27 at 12.18.13 PM](https://us1.discourse-cdn.com/bubble/original/3X/7/6/76792fc300078bb6fd3bc016daabc316c2821eb2.png)

Only occurs when checking “obfuscate plugin”, publishes fine otherwise.

No idea if this is just on my end/internet:

 ![Screenshot 2023-07-27 at 12.24.38 PM](https://us1.discourse-cdn.com/bubble/original/3X/0/6/068488dd1825712720535c7b29bf8a19600d3346.png)

---

<div class="post-metadata">

**Author:** ![sudsy](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sudsy/32/114637_2.png) [@sudsy](https://forum.bubble.io/u/sudsy)\
**Post date:** [July 27, 2023, 4:22pm UTC](https://forum.bubble.io/t/plugin-developer-feature-plugin-code-obfuscation/274620/11 "2023-07-27T16:22:09Z")

</div>

> [@leon.maksin](#):
>
> If I’m understanding you correctly, this is a problem that plugin obfuscation can’t really solve.

It was a poor choice of words on my part. By “method names”, I really meant “identifiers” which are readily discoverable client-side and correspond to the names of plugin methods - e.g. “Initialize”, “Update”, etc.

Surely there’s a way to eliminate, randomize, or obfuscate those identifiers.

---

<div class="post-metadata">

**Author:** ![leon.maksin](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/leon.maksin/32/137650_2.png) [@leon.maksin](https://forum.bubble.io/u/leon.maksin)\
**Post date:** [July 27, 2023, 5:08pm UTC](https://forum.bubble.io/t/plugin-developer-feature-plugin-code-obfuscation/274620/12 "2023-07-27T17:08:14Z")

</div>

I just private messaged you, I’ll investigate asap

---

<div class="post-metadata">

**Author:** ![leon.maksin](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/leon.maksin/32/137650_2.png) [@leon.maksin](https://forum.bubble.io/u/leon.maksin)\
**Post date:** [July 27, 2023, 5:09pm UTC](https://forum.bubble.io/t/plugin-developer-feature-plugin-code-obfuscation/274620/13 "2023-07-27T17:09:42Z")

</div>

Unfortunately, there’s no way to do this today. We’ll consider your feedback, let me know if you have any other suggestions as you test this out.

---

<div class="post-metadata">

**Author:** ![wesleywsls](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/wesleywsls/32/204621_2.png) [@wesleywsls](https://forum.bubble.io/u/wesleywsls)\
**Post date:** [July 27, 2023, 5:14pm UTC](https://forum.bubble.io/t/plugin-developer-feature-plugin-code-obfuscation/274620/14 "2023-07-27T17:14:22Z")

</div>

I’m trying to publish a new version of my plugin without obfuscating, and it looks like I always stay on the same version (I also don’t have the option to choose if it’s a major or minor update anymore) so I can’t upgrade to the new version of my plugin in the editor.

 ![Capture d’écran 2023-07-27 à 19.13.42](https://us1.discourse-cdn.com/bubble/original/3X/a/c/ac8d5c65d341abaeaf48bef982a8ab0164dd5fb1.png)

---

<div class="post-metadata">

**Author:** ![starnapp](https://avatars.discourse-cdn.com/v4/letter/s/7feea3/32.png) [@starnapp](https://forum.bubble.io/u/starnapp)\
**Post date:** [July 27, 2023, 5:20pm UTC](https://forum.bubble.io/t/plugin-developer-feature-plugin-code-obfuscation/274620/15 "2023-07-27T17:20:29Z")

</div>

same problem here

---

<div class="post-metadata">

**Author:** ![leon.maksin](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/leon.maksin/32/137650_2.png) [@leon.maksin](https://forum.bubble.io/u/leon.maksin)\
**Post date:** [July 27, 2023, 5:30pm UTC](https://forum.bubble.io/t/plugin-developer-feature-plugin-code-obfuscation/274620/16 "2023-07-27T17:30:03Z")

</div>

@wesleywsls @starnapp thanks for flagging. I’ve identified the issue, we’re releasing a fix.

---

<div class="post-metadata">

**Author:** ![keith](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/keith/32/56020_2.png) [@keith](https://forum.bubble.io/u/keith)\
**Post date:** [July 27, 2023, 5:31pm UTC](https://forum.bubble.io/t/plugin-developer-feature-plugin-code-obfuscation/274620/17 "2023-07-27T17:31:00Z")

</div>

Well, I’ll be happy if it works properly. Haven’t had a chance to test this auto minification yet. Good to see that feature come back, though. Hopefully this gets maintained better than the google compiler version did. (And terser is what I use for manual minification already.)

---

<div class="post-metadata">

**Author:** ![eli](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/eli/32/42610_2.png) [@eli](https://forum.bubble.io/u/eli)\
**Post date:** [July 27, 2023, 5:36pm UTC](https://forum.bubble.io/t/plugin-developer-feature-plugin-code-obfuscation/274620/18 "2023-07-27T17:36:54Z")

</div>

@leon.maksin I assume you’ve considered this but what happens with variables set on the instance or window objects? For instance, if I set a function at `instance.data.function`, will that still be able to be referenced across other actions on the element?

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dorilama/32/226878_2.png) [@dorilama](https://forum.bubble.io/u/dorilama)\
**Post date:** [July 27, 2023, 5:55pm UTC](https://forum.bubble.io/t/plugin-developer-feature-plugin-code-obfuscation/274620/19 "2023-07-27T17:55:29Z")

</div>

> [@leon.maksin](#):
>
> All client-facing code on the internet is generally public domain

Gently reminding that MIT license and the other open source licenses are different from public domain.

---

<div class="post-metadata">

**Author:** ![Artin](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@Artin](https://forum.bubble.io/u/Artin)\
**Post date:** [July 27, 2023, 6:00pm UTC](https://forum.bubble.io/t/plugin-developer-feature-plugin-code-obfuscation/274620/20 "2023-07-27T18:00:44Z")

</div>

> [@eli](#):
>
> For instance, if I set a function at `instance.data.function`

From my own tests with obfuscation, everything works just fine even if all the code is obfuscated. States/Events/Custom functions all are working well.

[Next page](https://forum.bubble.io/t/plugin-developer-feature-plugin-code-obfuscation/274620.md?page=2)
