Solvedrogue.js bundlerUrl: bundle.js: Uncaught SyntaxError: Unexpected token <

I am running rogue.js version 0.6.10 and still getting this issue for bundle.js. Mentioned in #20.

I am also new to SSR and I don't know if I figured out what is the right purpose for this bundle. Should it be compiled client side (client.js) script for usage when continuing with an app on the browser side after initial server render?

razzle example uses some client.js script so I don't know, because when I build the app via @roguejs/cli the bundle.js contains ES5 version of server.js code, but that may be the error and because of it I got confused.

Thanks for answer.
Keep up the great work. Rogue.js will be awesome.

5 Answers

✔️Accepted Answer

The Unexpected token < can occur when there's an error pertaining to your client bundle, such as it not being found

bundleUrl needs to point to the compiled client bundle

so in your case, if you're in development, it'll be relative to wherever babel-node is compiling src/client.js to

let me know if you can get it to work, otherwise if you can make a tiny example I can check it out

More Issues: