File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -106,9 +106,11 @@ def webpack_env
106
106
107
107
Shakapacker . set_shakapacker_env_variables_for_backward_compatibility
108
108
109
- env . merge ( "SHAKAPACKER_ASSET_HOST" => ENV . fetch ( "SHAKAPACKER_ASSET_HOST" , ActionController ::Base . helpers . compute_asset_host ) ,
110
- "SHAKAPACKER_RELATIVE_URL_ROOT" => ENV . fetch ( "SHAKAPACKER_RELATIVE_URL_ROOT" , ActionController ::Base . relative_url_root ) ,
111
- "SHAKAPACKER_CONFIG" => instance . config_path . to_s )
109
+ env . merge (
110
+ "SHAKAPACKER_ASSET_HOST" => instance . config . asset_host ,
111
+ "SHAKAPACKER_RELATIVE_URL_ROOT" => instance . config . relative_url_root ,
112
+ "SHAKAPACKER_CONFIG" => instance . config_path . to_s
113
+ )
112
114
end
113
115
114
116
def bin_shakapacker_path
Original file line number Diff line number Diff line change @@ -116,6 +116,14 @@ def fetch(key)
116
116
data . fetch ( key , defaults [ :shakapacker_precompile ] )
117
117
end
118
118
119
+ def asset_host
120
+ ENV . fetch ( "SHAKAPACKER_ASSET_HOST" , ActionController ::Base . helpers . compute_asset_host )
121
+ end
122
+
123
+ def relative_url_root
124
+ ENV . fetch ( "SHAKAPACKER_RELATIVE_URL_ROOT" , ActionController ::Base . relative_url_root )
125
+ end
126
+
119
127
private
120
128
def data
121
129
@data ||= load
You can’t perform that action at this time.
0 commit comments