mirror of
https://github.com/discourse/discourse.git
synced 2025-02-06 03:18:23 +00:00
Revert "FIX: Ensure sourcemap's source is correct"
This reverts commit 4553a0f6e07128b71bc2d53ed35c72fbd55c0c90.
This commit is contained in:
parent
c7a8bbd6a5
commit
1de5b4ad64
@ -75,13 +75,11 @@ end
|
||||
def compress_node(from, to)
|
||||
to_path = "#{assets_path}/#{to}"
|
||||
assets = cdn_relative_path("/assets")
|
||||
assets_additional_path = (d = File.dirname(from)) == "." ? "" : "/#{d}"
|
||||
source_map_root = assets + assets_additional_path
|
||||
source_map_root = assets + ((d = File.dirname(from)) == "." ? "" : "/#{d}")
|
||||
source_map_url = cdn_path "/assets/#{to}.map"
|
||||
base_source_map = 'public/assets' + assets_additional_path
|
||||
|
||||
cmd = <<~EOS
|
||||
uglifyjs '#{assets_path}/#{from}' -m -c -o '#{to_path}' --source-map "base='#{base_source_map}',root='#{source_map_root}',url='#{source_map_url}'"
|
||||
uglifyjs '#{assets_path}/#{from}' -m -c -o '#{to_path}' --source-map "root='#{source_map_root}',url='#{source_map_url}'" --output '#{to_path}'
|
||||
EOS
|
||||
|
||||
STDERR.puts cmd
|
||||
|
Loading…
x
Reference in New Issue
Block a user