Search code examples
meteorecmascript-6proxy-classes

How do I use ES2015 Proxy in Meteor?


Since Meteor 1.2 ES2015 is supported by default for any .js file in a Meteor project. That's great, but when I try to use the name Proxy like

const p = new Proxy(obj1, obj2);

it throws an undefined name Proxy.

I know ES6 is supported as all other features work (including Promises). So what am I doing wrong?


Solution

  • Just figured it out. Meteor uses Babel transpiler which doesn't offer support for Proxies, since it isn't possible to polyfill using ES5.