Closed artaommahe closed 8 years ago
It looks like you're using an older version of React, correct? React.Dom.div
is 0.12, but the react
preset assumes you are using 0.14.
For 0.12, what you want is to install/enable babel-plugin-transform-react-jsx-compat
.
bundler.transform(babelify, {
extensions: ['.jsx'],
presets: ['es2015', 'react'],
plugins: ['transform-react-jsx-compat']
});
@loganfsmyth oh, sorry, added react version to first post, it's 0.14.6
Ah okay, I assumed you were on 0.12 since you said
As i understand there must be return React.Dom.div(...) instead of return React.Dom('div', ...)
For 0.14 then, you issue is just that you have /** @jsx React.Dom */
in there, which is what is telling it to do the weird behavior it is doing now. Delete the pragma and it'll do React.createElement('div'
, which is the way to do it in 0.14.
@loganfsmyth yep, it is the solution, thx ;)
After replacing reactify with babelify have this eror in console for all jsx files
this is render functions in bundle
sample original
package.json
gulpfile
As i understand there must be
return React.Dom.div(...)
instead ofreturn React.Dom('div', ...)