catamphetamine / webpack-isomorphic-tools

Server-side rendering for your Webpack-built applications (e.g. React)
MIT License
1.25k stars 48 forks source link

Unexpected token > #130

Closed eddievagabond closed 7 years ago

eddievagabond commented 7 years ago

My project is compiling and running correctly in development mode, but in the chrome console I see the following.

ss

When I look at the source, I am seeing the generated html from my html.jsx page. I do not understand why this is happening. Is there a simple example repo with server and dev builds. Every example I look at has been outdated or doesn't run properly. Any help would be much appreciated.

catamphetamine commented 7 years ago

Yes, there is an example repo and it's in the readme https://github.com/halt-hammerzeit/webapp

catamphetamine commented 7 years ago

The reason you're seeing "Unexpected token <" is because you don't serve app-....js file and intead return a 404 Not found HTML page hence the error mesage

eddievagabond commented 7 years ago

I'm not entirely sure what you mean. The application is returned and running in the browser. The js files are generated correctly by webpack and added as scripts to the template. Maybe I am misunderstanding how this is supposed to work.

catamphetamine commented 7 years ago

@eddievagabond you surely are

eddievagabond commented 7 years ago

I'll try again from the beginning. Thanks for the help.

catamphetamine commented 7 years ago

Perhaps you should look at universal-webpack instead. It has a much simpler example project: https://github.com/halt-hammerzeit/webpack-react-redux-isomorphic-render-example