8000 Babel 6 expects user to specify es2015 preset · Issue #3 · ccoenraets/es6-tutorial · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Babel 6 expects user to specify es2015 preset #3
Open
@brickaa

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.

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

      0