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

Commit e85b984

Browse files
committed
Disable the JavaScript compressor in a configuration block
Fixes #5. Thanks @grahamlyus!
1 parent 25e620e commit e85b984

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/tasks/requirejs-rails_tasks.rake

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,13 @@ OS X Homebrew users can use 'brew install node'.
8181
# Ensure that Sprockets doesn't try to compress assets before they hit
8282
# r.js. Failure to do this can cause a build which works in dev, but
8383
# emits require.js "notloaded" errors, etc. in production.
84-
Rails.application.config.assets.js_compressor = false
84+
#
85+
# Note that a configuration block is used here to ensure that it runs
86+
# after the environment ("config/application.rb",
87+
# "config/environments/*.rb") has been set up.
88+
Rails.application.config.assets.configure do |env|
89+
env.js_compressor = nil
90+
end
8591
end
8692

8793
# Invoke another ruby process if we're called from inside

0 commit comments

Comments
 (0)