Open boxofrad opened 9 years ago
@boxofrad How is it declared in your requirejs.yml
?
Hello.
I'm having some difficulties with requirejs-rails together with recent versions of rails 4, which may include the same issue as reported by @boxofrad above.
I've created a couple of github repos, to help demonstrate working and non-working examples.
First of all, I've taken the example given at https://github.com/fs/requirejs-rails-example (which works), and adapted it for rails 4.1.4, see https://github.com/RusDavies/rails_4.1.4 . That works just fine.
Then I've attempted to adapt the same code for rails 4.2.1, see https://github.com/RusDavies/rails_4.2.1 . In this case, there are a couple of issues:
With these changes, it seems to work. However, point (2) seems to go against the requirejs-rails documentation (https://github.com/jwhitley/requirejs-rails#avoid-configassetsprecompile). Moreover, this was not necessary with rails 4.1.4.
So, am I doing something wrong? Or is there some incompatibility with recent versions of Rails ?
Thanks for your help :)
Sorry for the late reply...
Here's my requirejs.yml
modules:
- name: 'application'
- name: 'portal'
- name: 'admin'
I've also had the same Asset filtered out and will not be served:
error in an app I'm upgrading from 3.2 to 4.2. This was discussed in the sprockets repo at https://github.com/rails/sprockets-rails/issues/156.
So far I've worked around this the same as @RusDavies, but of course I don't like having to maintain that parallel manifest just for development purposes.
I've recently tried to upgrade my app from rails 4.1.4 to 4.1.10, and am now getting the following error in development:
This asset was intentionally left out of the precompile because it's in my requirejs.yml.
Thanks :sparkling_heart: