dawarich/config/initializers/web_app_manifest.rb

22 lines
780 B
Ruby
Raw Normal View History

# This file was generated by rails_favicon_generator, from
# https://realfavicongenerator.net/
# It makes files with .webmanifest extension first class files in the asset
# pipeline. This is to preserve this extension, as is it referenced in a call
# to asset_path in the _favicon.html.erb partial.
Rails.application.config.assets.configure do |env|
2025-10-02 15:03:26 -04:00
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)
2025-09-26 13:48:52 -04:00
# Register .webmanifest files with the correct MIME type
2025-10-02 15:03:26 -04:00
# env.register_mime_type 'application/manifest+json', extensions: ['.webmanifest']
end