Skip to content

Babel 6 expects user to specify es2015 preset #3

Description

@brickaa

Hey, I was following your tutorial and on step 3 about object destructuring, I kept getting an unexpected token error from the line let {monthlyPayment, monthlyRate} = calculateMonthlyPayment(principal, years, rate);

Figured out that Babel 6 wasn't transpiling es2015 by default. Fixed it by adding a .babelrc file, reference:

{
  "presets": ["es2015"]
}

Thanks for making this, it's been helpful.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions