peh / grails-babel-asset-pipeline

babel.js transformation for grails-asset-pipeline
7 stars 2 forks source link

how to use this for jsx transformation #16

Open atript8 opened 6 years ago

atript8 commented 6 years ago

I am pretty green when it comes to JS. I was using jsx-grails-pipeline and it was plain and simple. Just do a asset:javascript and pass the jsx file but it fails with an unknown error when trying to create a war file. With this plugin I am getting require errors (mobx is not defined, React is not defined, require is not defined). I tried setting

grails.assets.babel.processor = 'direct'

But this didn't help. I am using grails 2.5.5, asset pipeline 2.5.7 Please suggest what kind of setup do I get this to work with the asset pipeline with minimum hassle. Do i need to require everything in my jsx's?