We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf1065f commit 1b7c521Copy full SHA for 1b7c521
lib/angular-rails-templates/transformer.rb
@@ -58,8 +58,12 @@ def config
58
end
59
60
def register(env, ext)
61
- if ::Sprockets::VERSION.to_i < 4
62
- env.register_engine ".#{ext}", ::Tilt[ext] # Legacy Sprockets
+ if ::Sprockets::VERSION.to_i < 4 # Legacy Sprockets
+ args = [".#{ext}", ::Tilt[ext]]
63
+ if ::Sprockets::VERSION.to_i == 3
64
+ args << { mime_type: "text/ng-#{ext}", silence_deprecation: true }
65
+ end
66
+ env.register_engine(*args)
67
else
68
instance.add_template(ext, ::Tilt[ext])
69
0 commit comments