Method: Sprockets::SourceMapProcessor.original_content_type

Defined in:
lib/sprockets/source_map_processor.rb

.original_content_type(source_map_content_type, error_when_not_found: true) ⇒ Object



54
55
56
57
58
59
60
61
62
63
64
# File 'lib/sprockets/source_map_processor.rb', line 54

def self.original_content_type(source_map_content_type, error_when_not_found: true)
  case source_map_content_type
  when "application/js-sourcemap+json"
    "application/javascript"
  when "application/css-sourcemap+json"
    "text/css"
  else
    fail(source_map_content_type) if error_when_not_found
    source_map_content_type
  end
end