# Does the plugin editor accepts ES6 JavaScript?

**URL:** <https://forum.bubble.io/t/does-the-plugin-editor-accepts-es6-javascript/36566>\
**Category:** Plugin builders\
**Created:** [August 27, 2018, 2:43am UTC](https://forum.bubble.io/t/does-the-plugin-editor-accepts-es6-javascript/36566 "2018-08-27T02:43:37Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![vini\_brito](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/vini_brito/32/22187_2.png) [@vini\_brito](https://forum.bubble.io/u/vini_brito)\
**Post date:** [August 27, 2018, 2:43am UTC](https://forum.bubble.io/t/does-the-plugin-editor-accepts-es6-javascript/36566/1 "2018-08-27T02:43:37Z")

</div>

I was trying to use template literals and create variables with “let” but it never accepted. Is there an option to enable ES6?

EDIT: Yes it does. Leaving the original question btw.

---

<div class="post-metadata">

**Author:** ![gustavopch](https://avatars.discourse-cdn.com/v4/letter/g/6de8d8/32.png) [@gustavopch](https://forum.bubble.io/u/gustavopch)\
**Post date:** [May 15, 2019, 3:46pm UTC](https://forum.bubble.io/t/does-the-plugin-editor-accepts-es6-javascript/36566/2 "2019-05-15T15:46:06Z")

</div>

I think this question should be rephrased as:

**Is modern JavaScript code (ES6+) in a plugin transpiled to ES5?**

That’s a very important question as I’d love to use spread operator, rest operator, etc…

---

<div class="post-metadata">

**Author:** ![Kirill](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/kirill/32/40584_2.png) [@Kirill](https://forum.bubble.io/u/Kirill)\
**Post date:** [May 15, 2019, 4:14pm UTC](https://forum.bubble.io/t/does-the-plugin-editor-accepts-es6-javascript/36566/3 "2019-05-15T16:14:22Z")

</div>

Up!) Interesting question, want use arrow functions in plugins and template.

---

<div class="post-metadata">

**Author:** ![vini\_brito](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/vini_brito/32/22187_2.png) [@vini\_brito](https://forum.bubble.io/u/vini_brito)\
**Post date:** [May 15, 2019, 6:21pm UTC](https://forum.bubble.io/t/does-the-plugin-editor-accepts-es6-javascript/36566/4 "2019-05-15T18:21:06Z")

</div>

I think the only way to know it is testing… load up a context where only ES5 would work then run the code. Something like an old version of a browser.

Also, I use template literals and arrow functions all the time and all goes well.

---

<div class="post-metadata">

**Author:** ![Kirill](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/kirill/32/40584_2.png) [@Kirill](https://forum.bubble.io/u/Kirill)\
**Post date:** [May 15, 2019, 6:26pm UTC](https://forum.bubble.io/t/does-the-plugin-editor-accepts-es6-javascript/36566/5 "2019-05-15T18:26:33Z")

</div>

Thank you!) Need test it!)

---

<div class="post-metadata">

**Author:** ![gustavopch](https://avatars.discourse-cdn.com/v4/letter/g/6de8d8/32.png) [@gustavopch](https://forum.bubble.io/u/gustavopch)\
**Post date:** [May 17, 2019, 2:04am UTC](https://forum.bubble.io/t/does-the-plugin-editor-accepts-es6-javascript/36566/6 "2019-05-17T02:04:29Z")

</div>

By looking at the JS files used by some Bubble apps, I can see they are minified. Usually JS minification is done together with transpiling…

Anyway, I think only the team can give us details on which features are transpiled and polyfilled.

---

<div class="post-metadata">

**Author:** ![gustavopch](https://avatars.discourse-cdn.com/v4/letter/g/6de8d8/32.png) [@gustavopch](https://forum.bubble.io/u/gustavopch)\
**Post date:** [May 19, 2019, 9:55pm UTC](https://forum.bubble.io/t/does-the-plugin-editor-accepts-es6-javascript/36566/7 "2019-05-19T21:55:10Z")

</div>

Now I just confirmed **Bubble doesn’t transpile code from plugins**. I had some arrow functions and consts in a plugin and couldn’t get it to work in IE10. After replacing those features by their ES5 equivalents, the plugin worked.

---

<div class="post-metadata">

**Author:** ![vini\_brito](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/vini_brito/32/22187_2.png) [@vini\_brito](https://forum.bubble.io/u/vini_brito)\
**Post date:** [May 19, 2019, 11:29pm UTC](https://forum.bubble.io/t/does-the-plugin-editor-accepts-es6-javascript/36566/8 "2019-05-19T23:29:38Z")

</div>

Ew, IE10! Just kidding, who knows what use cases may arise out there… thank you for testing and reporting it back to us!

---

<div class="post-metadata">

**Author:** ![gustavopch](https://avatars.discourse-cdn.com/v4/letter/g/6de8d8/32.png) [@gustavopch](https://forum.bubble.io/u/gustavopch)\
**Post date:** [May 19, 2019, 11:37pm UTC](https://forum.bubble.io/t/does-the-plugin-editor-accepts-es6-javascript/36566/9 "2019-05-19T23:37:21Z")

</div>

I know how you feel 😂.

Safari has some gotchas too. Actually, better be cautious with any new EcmaScript features as even Chrome may have issues depending on its version. Unfortunately there are always those users (mostly in desktop) that don’t update their browsers.

But Bubble should transpile the code (and perhaps integrate with something like CodeSandbox for better tooling).
