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

sprockets-rails >= 3 throws "Asset was not declared to be precompiled in production"

Open leppert opened this issue 9 years ago • 2 comments
trafficstars

See also: https://github.com/rails/sprockets-rails/issues/297

leppert avatar May 04 '16 13:05 leppert

We were getting the same error but setting config.check_precompiled_asset = false solved it.

This was added to sprockets-rails recently in commit: https://github.com/rails/sprockets-rails/commit/b4f9006c7ff5ccd74b467c1b81e721c15dd5daf7

mccallumjack avatar Jun 30 '16 15:06 mccallumjack

Rails.application.config.assets.precompile += Rails.application.config.requirejs.user_config['modules'].map { |m| "#{m['name']}.js" } Do you think this workaround reasonable?

kevinluo201 avatar Jan 04 '21 09:01 kevinluo201