@jmfurlott Can you gist your entire file? Likely it's as the error message says, you're using the import not at the top level.
-
-
Replying to @sebmck
@sebmck https://gist.github.com/jmfurlott/9c3123d5bf1916929456 … This is the entry point of my entire app1 reply 0 retweets 0 likes -
Replying to @jmfurlott
@jmfurlott Parses fine for me http://babeljs.io/repl/#?experimental=true&playground=true&evaluate=true&loose=false&spec=false&code='use%20strict'%3B%0A%0A%2F%2Fvar%20React%20%3D%20require('react')%3B%0Aimport%20React%20from%20'react'%3B%0Avar%20Router%20%3D%20require('react-router')%3B%0Avar%20%7B%20Route%2C%20RouteHandler%2C%20Link%20%7D%20%3D%20Router%3B%0A%0A%0A%0Awindow.React%20%3D%20React%3B%20%2F%2F%20export%20for%20http%3A%2F%2Ffb.me%2Freact-devtools%0A%0A%0Avar%20App%20%3D%20React.createClass(%7B%0A%0A%0A%7D)%3B%0A%0A%0Avar%20routes%20%3D%20(%0A%20%20%3CRoute%20handler%3D%7BApp%7D%3E%0A%20%20%20%20...%0A%20%20%3C%2FRoute%3E%0A)%3B%0A%0A%0ARouter.run(routes%2C%20function(Handler)%20%7B%0A%20%20React.render(%3CHandler%20%2F%3E%2C%20document.getElementById('app'))%3B%0A%7D)%3B%0A … Are you sure it's not another loader you're using?1 reply 0 retweets 0 likes -
Replying to @jmfurlott
@jmfurlott Why are you using jsx-loader at all, especially the harmony option?1 reply 0 retweets 0 likes -
Replying to @jmfurlott
@jmfurlott Babel can parse and transform JSX. Do you have the entire stacktrace so I can verify where it's coming from?2 replies 0 retweets 0 likes -
Replying to @jmfurlott
@jmfurlott Not sure, could be react-hot-loader wrapping your file in a closure or something, not sure of the specifics. /cc@dan_abramov1 reply 0 retweets 0 likes -
Replying to @sebmck
@sebmck@dan_abramov Yep, removing react-hot-loader from the build fixes it. Thanks for helping me get this far1 reply 0 retweets 0 likes
@jmfurlott No problem! Adding the `loose=modules` option to your babel webpack config should "fix" it. @dan_abramov
-
-
- 3 more replies
New conversation
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 