diff --git a/CHANGELOG.md b/CHANGELOG.md index cd7ac906d..fdc697cac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ Get upgrade notes from Sprockets 3.x to 4.x at https://github.com/rails/sprocket - Adding new directive `depend_on_directory` [#668](https://github.com/rails/sprockets/pull/668) - Fix `application/js-sourcemap+json` charset [#669](https://github.com/rails/sprockets/pull/669) - Fix `CachedEnvironment` caching nil values [#723](https://github.com/rails/sprockets/pull/723) +- Process `*.jst.ejs.erb` files with ERBProcessor [#674](https://github.com/rails/sprockets/pull/674) ## 4.0.3 diff --git a/lib/sprockets.rb b/lib/sprockets.rb index e4a03b584..fb03df54a 100644 --- a/lib/sprockets.rb +++ b/lib/sprockets.rb @@ -191,6 +191,7 @@ module Sprockets text/scss text/yaml text/eco + text/ejs ), 'application/\2+ruby', '.erb', ERBProcessor) register_mime_type 'application/html+ruby', extensions: ['.html.erb', '.erb', '.rhtml'], charset: :html diff --git a/test/test_transformers.rb b/test/test_transformers.rb index e021325d6..65b3575b5 100644 --- a/test/test_transformers.rb +++ b/test/test_transformers.rb @@ -121,6 +121,7 @@ def setup ['application/javascript+ruby', 0.8], ['application/coffeescript+ruby', 0.8], ["application/eco+ruby", 0.8], + ["application/ejs+ruby", 0.8], ['text/mustache', 0.8], # TODO: Extra step transform should be weighted down ['text/x-handlebars-template', 0.8], # TODO: Extra step transform should be weighted down ['application/dart', 0.8]