Import React from 'react' results in Uncaught SyntaxError: Unexpected identifier
It is not working because it is not translating es6, so import statement is not working, Yo need to babel-preset-es2015
and configure it .babelrc
{
"presets":[
"es2015", "react"
]
}
Try this : transform-es2015-modules-amd , This plugin transforms ES2015 modules to Asynchronous Module Definition (AMD).
{
presets: ["env", "react"],
plugins: ["transform-es2015-modules-amd"]
}
more at transform-es2015-modules-amd