From 5b39a33ab68a4022bbc49375c0e0d4740702b1ef Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Fri, 13 Feb 2015 14:28:12 -0800 Subject: [PATCH] Serve sourcemaps as JSON so extensions which rely on mime-type function correctly --- middleman-core/lib/middleman-core/core_extensions/request.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/middleman-core/lib/middleman-core/core_extensions/request.rb b/middleman-core/lib/middleman-core/core_extensions/request.rb index aabb708e..612001e1 100644 --- a/middleman-core/lib/middleman-core/core_extensions/request.rb +++ b/middleman-core/lib/middleman-core/core_extensions/request.rb @@ -21,6 +21,9 @@ module Middleman ::Rack::Mime::MIME_TYPES['.html'] = 'text/html; charset=utf-8' ::Rack::Mime::MIME_TYPES['.htm'] = 'text/html; charset=utf-8' + # Sourcemap format + ::Rack::Mime::MIME_TYPES['.map'] = 'application/json; charset=utf-8' + app.extend ClassMethods app.extend ServerMethods