Hi all,
I'm trying to set-up my clojurescript build that's using a js lib with JSX
definitions. But this ends up with the following error:
SyntaxError: expected expression, got '<'
<div className="commentBox">
This error is thrown for the compiled/out/components.js
My includes in the HTML are as follows:
<script src="js/compiled/out/react.inc.js"></script>
<script src="js/compiled/out/react-dom.inc.js"></script>
<script src="http://fb.me/JSXTransformer-0.12.2.js"></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.23/browser.min.js"></script>
<script src="http://code.jquery.com/jquery-1.10.0.min.js"> </script>
Apart from that my clojure build is:
{:main uni-stuttgart.ipsm.coact.core
:output-to
"resources/public/js/compiled/app.js"
:output-dir
"resources/public/js/compiled/out"
:asset-path "js/compiled/out"
:foreign-libs [{:file
"resources/public/js/libs/components.js"
:provides ["libs.components"]
:preprocess :jsx}]
:source-map-timestamp true
}
And the components.js is:
/**
* @jsx React.DOM
*/
var CommentBox = React.createClass({
render: function() {
return (
<div className="commentBox">
Hello, world! I am a CommentBox.
</div>
);
}
});
Any ideas how to fix this problem?
Regards,
Timur
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message because you are subscribed to the Google Groups
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/clojurescript.