- Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathwebpack.rb
23 lines (21 loc) · 785 Bytes
/
webpack.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Rails.application.config.assets.paths << Rails.root.join("app","assets","webpack")
Rails.application.config.assets.precompile += %w(minimal.csslive-banner.jpghappy-cat.jpgconference-room.pngoffline-holder.pngserver-bundle.js)
Rails.application.config.assets.compile=true
type=ENV["REACT_ON_RAILS_ENV"] == "HOT" ? "non_webpack" : "static"
Rails.application.config.assets.precompile += [
"application_#{type}.js",
"application_#{type}.css"
]
# suppress annoying asset 404s
ifRails.env.development?
classActionDispatch::DebugExceptions
alias_method:old_log_error,:log_error
deflog_error(env,wrapper)
ifwrapper.exception.is_a?ActionController::RoutingError
return
else
old_log_errorenv,wrapper
end
end
end
end