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

Popular posts from this blog

swift - Button on Table View Cell connected to local function -

dns - Dokku server hosts two sites with TLD's, both domains are landing on only one app -

c# - ajax - How to receive data both html and json from server? -