Closed rafaelchiti closed 10 years ago
Nevermind, silly of me a friend just spotted out how to configure it.
var browserify = require('browserify-middleware');
var reactify = require('reactify');
var reactifyES6 = function(file) {
return reactify(file, {'es6': true});
};
browserify.settings({
transform: [reactifyES6],
extensions: ['.js', '.jsx'],
grep: /\.jsx?$/
})
Not silly at all. I was looking for the same thing. It's far from obvious to figure out from Reactify documentation.
Perhaps one of you could add a pull request to make this library's documentation clearer? Perhaps an extra example in the readme?
I was wondering the same thing, thanks for sharing your solution!
Thanks for sharing!
Hi sorry if it's an obvious question but I've been digging int he code that calls the transformers and can not see how to send this option to the transformer I'm using (reactify). Probable I need to configure the transformer in a different way but still not sure how to set the parameter.
This is my current code. How can I set options on that particular transformer?, is it possible the reactify API is not compatible for setting the option?.
The option I need to set is '--es6', which I guess will become {es6: true}
Thanks!