-
Notifications
You must be signed in to change notification settings - Fork 755
Asset pipeline require
not working with coffeescript [v1.4.2 and above]
#415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Glanced over the changes in those two, but there's nothing that stands out as problematic to me. However, I'm not an expert on how the asset pipeline works. I've created a minimal app that reproduces the issue - https://github.com/tmikoss/react-rails-coffeescript-require-example |
Man, it's been a weekend of Sprockets-wrangling. Thanks the the demo project. I cloned it locally and started it up. Sure enough, I only got the three log statements. So I pointed it at my local Some things I noticed
It makes me think that somehow our transformer doesn't play well with the engine scheme. Some things I tried
So far, nothin! But it has to be, has to be, has to be, something related to engines vs. transformers. I've got to get a failing spec in the repo. I'm going to try making some gemfiles with sprockets 3 and Sprockets 2! |
I opened an issue an issue on Sprockets to see if that team has any suggestions: rails/sprockets#231 |
Tried this again in hopes that it would have been fixed by some work in the last few months, and it seems like it was:
🎉 Since the previous update also bumped
🎊 @tmikoss , Are you able to update to the latest react-rails? OK to close this? |
Calling
#= require ./other_file
, in a.js.jsx.coffee
file no longer seems to work in version 1.4.2 and above. The file is not evaluated - tested by putting aconsole.log
at the top of the required file.Changing the extension to
.js.jsx
and calling//= require ./other_file
works as expected.Last version of
react-rails
where it worked as expected was1.3.3
.Setting
config.react.jsx_transformer_class = React::JSX::JSXTransformer
does not fix the issue.The text was updated successfully, but these errors were encountered: