Skip to content Skip to sidebar Skip to footer

Upgrading From Babel 5.8.35 To 6.0.0 Will Not Compile App.js With A SyntaxError And Unexpected Token

I am in the process of upgrading all my ReactJS components with webpack. In the process I have not been able to upgrade from babel 5 to 6. When I do so I get the following stack t

Solution 1:

You have to install the babel presets

react preset

es2015 preset

add a .babelr file to your project where you'll set up your presets

{
  "presets": ["es2015", "react"]
}

This is a good tutorial if you want to take a look.


Post a Comment for "Upgrading From Babel 5.8.35 To 6.0.0 Will Not Compile App.js With A SyntaxError And Unexpected Token"