I am having a problem with browserHistory in react-router 2.0.0-rc. I am trying to get an edit page to work by using a react-router param for the username, followed by a nested static route called 'edit'. When I use react-router links, the page loads as expected, but after entering the url manually or refreshing, the page shows up blank with a bundle error Uncaught SyntaxError: Unexpected token <
.
All of my other routes work fine. Unfortunately all of the docs seem to use static followed by dynamic route params and not the other way around.
Here are my routes:
<Route path="/" component={App} onEnter={currentUserCheck}>
<IndexRoute component={HomePage} />
<Route path="/signup" component={SignupForm} />
<Route path="/login" component={LoginForm} />
<Route path="/chart" component={PollResult} />
<Route path="/:username/edit" component={EditProfile}/>
<Route path="/:username" component={ProfilePage}/>
<Route path="*" component={NoMatch}/>
</Route>