Skip to content

Commit f01102a

Browse files
Yunlei Liugauravtiwari
Yunlei Liu
authored andcommitted
add relative_url_root to webpacker config (#1236)
1 parent 88ff79c commit f01102a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/webpacker/compiler.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ def compilation_digest_path
7878
end
7979

8080
def webpack_env
81-
env.merge("NODE_ENV" => @webpacker.env, "WEBPACKER_ASSET_HOST" => ActionController::Base.helpers.compute_asset_host)
81+
env.merge("NODE_ENV" => @webpacker.env,
82+
"WEBPACKER_ASSET_HOST" => ActionController::Base.helpers.compute_asset_host,
83+
"WEBPACKER_RELATIVE_URL_ROOT" => ActionController::Base.relative_url_root)
8284
end
8385
end

0 commit comments

Comments
 (0)