requirejs-rails icon indicating copy to clipboard operation
requirejs-rails copied to clipboard

Default assets pipeline overwrite requirejs-rails compiled results

Open gykpro opened this issue 12 years ago • 1 comments

I'm using requirejs-rails 0.9.1 When I execute

rake assets:precompile

my console shows two tasks:

rake requirejs:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets

And I found that, when application.js is just generated, I can see all required modules, a couple of seconds later, the file changed, and all modules are gone, so it's overwritten by default assets pipeline generated file.

If I execute only

rake requirejs:precompile:all RAILS_ENV=production RAILS_GROUPS=assets

Then I get what I need

Am I missing some configuration or there is a bug?

gykpro avatar Jan 24 '13 10:01 gykpro

In my environment both tasks get executed, too, this seems to be intended. When executing only the requirejs:precompile task, all other assets are missing.

The regular precompile shouldn't be able to overwrite your generated application.js if you have this set in config/evironments/production.rb

config.assets.digest = true

1st8 avatar Feb 16 '13 13:02 1st8