Rvert web_app_manifest.rb changes

This commit is contained in:
Eugene Burmakin 2025-10-02 21:03:26 +02:00
parent e8cc4c5b8b
commit 6ec6330ada

View file

@ -6,6 +6,16 @@
# to asset_path in the _favicon.html.erb partial.
Rails.application.config.assets.configure do |env|
# Register .webmanifest files with the correct MIME type
env.register_mime_type 'application/manifest+json', extensions: ['.webmanifest']
mime_type = 'application/manifest+json'
extensions = ['.webmanifest']
if Sprockets::VERSION.to_i >= 4
extensions << '.webmanifest.erb'
env.register_preprocessor(mime_type, Sprockets::ERBProcessor)
end
env.register_mime_type(mime_type, extensions: extensions)
# Register .webmanifest files with the correct MIME type
# env.register_mime_type 'application/manifest+json', extensions: ['.webmanifest']
end