Closed inkong closed 8 years ago
+1 have similar issue, which is hard to troubleshoot
Same here. Anyone with a solution?
@markvital @francoislefebvre this lib does not compile JSX, I recommend compile it separately with Babel.
Thanks.
Solution :
$ npm install --save-dev gulp-babel
$ npm install --save-dev babel-plugin-transform-react-jsx
gulpfile.js
var gulp = require("gulp");
var babel = require("gulp-babel");
gulp.task("default", function () {
return gulp.src("resources/jsx/*")
.pipe(babel({
plugins: ['transform-react-jsx']
}))
.pipe(gulp.dest("public/js"));
});
HI
Do you have any idea why I'm getting this error below when trying to add this in my view @react_component('Message', [ 'name' => 'Hue' ])
V8Js::compileString():18903: SyntaxError: Unexpected token <