Thursday, 8 June 2017

Babel setup on ES7

I have been upgrading my project to use ES7. I have changed some codes, made use of classes.

But there is a problem.

class Example {

   change = async (params) => {

       const job = await Some.job();
   }
}

Everytime I wanted to debug it gives me Unexpected token problem. Even if I run it with Babel, it fails. I know a project where people use this kind of syntax and it works. I could not a valid solution on the internet, a couple github issues but nothing solid, so asking here. What is the problem here? How should I setup the Babel or the project? Below the error from the console and my config file screenshots.

error from the console

build config package.json

dependencies

eslint confg



via msharpp

No comments:

Post a Comment