-
Notifications
You must be signed in to change notification settings - Fork 751
Closed
Description
First of all, thanks for great gem! :)
I seem to not be able to activate the harmony mode of the jsx compiler when using Rails.
I have this in my application.rb:
config.react.jsx_transform_options = {
harmony: true,
}
One of my component, have a code like this:
var { checked, ...other } = this.props;
It compiles fine with jsx -x jsx --harmony app/assets/javascripts/components app/assets/javascripts/components:
var $__0= this.props,checked=$__0.checked,other=(function(source, exclusion) {var rest = {};var hasOwn = Object.prototype.hasOwnProperty;if (source == null) {throw new TypeError();}for (var key in source) {if (hasOwn.call(source, key) && !hasOwn.call(exclusion, key)) {rest[key] = source[key];}}return rest;})($__0,{checked:1});
But, not inside Rails itself. It stays var { checked, ...other } = this.props; and I got a Uncaught SyntaxError: Unexpected token {. (Other jsx lines compile fine though.)
Any ideas? :/
Metadata
Metadata
Assignees
Labels
No labels