reactjs - browserify.require does not work with jsx files in from version 9 -
i have little bundle program using browserify api:
var browserify = require('browserify') var b = browserify() b.transform('reactify') b.require('./my-component.jsx') b.bundle(function (e, val) { console.log(e == null) })
this work in browserify versions < 9 not above. problem react component , error looks this:
<div></div> ^ parseerror: unexpected token
is there explanation this? seems work commande line using: browserify -r ./my-component.jsx -t reactify
use api.
Comments
Post a Comment