jeudi 31 décembre 2015

Ember >2.2.0 getting regeneratorRuntime is not defined

so I was working with an iterator inside a service with Ember. The code worked using the old style scripts I cannot use the ES2015 style

ReferenceError: regeneratorRuntime is not defined

    stuff[Symbol.iterator] = function *(){
        debugger;
        let properties = Object.keys(this);
        for(let p of properties){
            yield this[p];
        }
    };

I know this is because of the new '*' operator on the function. I have seen answers http://ift.tt/1mTz84G that describe having to load a browser-polyfill npm but I'm a little unclear how to get this to work inside the ember framework. Has anyone done this successfully? or should I just abandon until Ember supports it.




Aucun commentaire:

Enregistrer un commentaire