Skip to content

Conversation

@a2ikm
Copy link

@a2ikm a2ikm commented Apr 11, 2015

It forces the path to JSXTransformer.js.

Currently assets.resolve("JSXTransformer.js") seems to search in tmp/react-rails, vendor/assets/react and vendor/assets/react/development at first.

So it's hard to place custom version in other directories like vendor/assets/bower_components managed with bower.

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@rmosolgo
Copy link
Member

@a2ikm thanks for taking a first pass at this, sorry some other changes have caused merge conflicts!

I took a stab at implementing this in #273, so you could pass it as a config option:

 config.react.jsx_transform_options = {
   asset_path: "bower_components/path/to/JSXTransformer.js" 
 }

What do you think of that?

@rmosolgo
Copy link
Member

I've merged #273, you can pass a custom asset_path: to jsx_transform_options!

@rmosolgo rmosolgo closed this May 28, 2015
@a2ikm
Copy link
Author

a2ikm commented May 29, 2015

@rmosolgo Sorry for my late reply. Your patch looks very nice, thank you!

@a2ikm a2ikm deleted the jsx_transformer_js branch May 29, 2015 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants