Skip to content

Commit

Permalink
add relative_url_root to webpacker config (#1236)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yunlei Liu authored and gauravtiwari committed Feb 24, 2018
1 parent 88ff79c commit f01102a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/webpacker/compiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ def compilation_digest_path
end

def webpack_env
env.merge("NODE_ENV" => @webpacker.env, "WEBPACKER_ASSET_HOST" => ActionController::Base.helpers.compute_asset_host)
env.merge("NODE_ENV" => @webpacker.env,
"WEBPACKER_ASSET_HOST" => ActionController::Base.helpers.compute_asset_host,
"WEBPACKER_RELATIVE_URL_ROOT" => ActionController::Base.relative_url_root)
end
end

0 comments on commit f01102a

Please sign in to comment.