4

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?

Jeremy
  • 1
  • 85
  • 340
  • 366

2 Answers2

4

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

0

Did you do add the ecmascript package to your project?

meteor add ecmascript

It isn't native to 1.2; you still need to add it to your project.

Brett McLain
  • 2,000
  • 2
  • 14
  • 32
  • 1
    Yeah, I did. Like I said, I use all other ES6 features, I just don't seem to be able to use that in particular. Maybe it's on a different name? I don't know, I can't find anything about it –  Dec 14 '15 at 15:48