Skip to content
This repository was archived by the owner on Mar 23, 2024. It is now read-only.

Commit 2977031

Browse files
committed
Merge pull request #45 from hollow/master
precompile require.js assets in any environment
2 parents d9072aa + b4f388d commit 2977031

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/requirejs/rails/engine.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ class Engine < ::Rails::Engine
2525

2626
config.before_initialize do |app|
2727
config = app.config
28-
if ::Rails.env == "production"
29-
config.assets.precompile += config.requirejs.precompile
30-
end
28+
config.assets.precompile += config.requirejs.precompile
3129

3230
manifest_path = File.join(::Rails.public_path, config.assets.prefix, "rjs_manifest.yml")
3331
config.requirejs.manifest_path = Pathname.new(manifest_path)
@@ -49,7 +47,7 @@ class Engine < ::Rails::Engine
4947
config.assets.digests.merge!(rjs_digests)
5048
end
5149
end
52-
50+
5351
end # class Engine
5452
end
5553
end

0 commit comments

Comments
 (0)