Merge branch 'master' into dev

This commit is contained in:
Eugene Burmakin 2025-10-04 14:47:57 +02:00
commit eb4f5d6e1b
5 changed files with 16 additions and 8 deletions

View file

@ -1,6 +1,5 @@
// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails // Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails
import "@rails/ujs"
import "@rails/actioncable" import "@rails/actioncable"
import "controllers" import "controllers"
import "@hotwired/turbo-rails" import "@hotwired/turbo-rails"
@ -13,5 +12,3 @@ import "./channels"
import "trix" import "trix"
import "@rails/actiontext" import "@rails/actiontext"
Rails.start()

View file

@ -29,7 +29,7 @@ Rails.application.configure do
# config.assets.css_compressor = :sass # config.assets.css_compressor = :sass
# Do not fallback to assets pipeline if a precompiled asset is missed. # Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = false config.assets.compile = true
config.assets.content_type = { config.assets.content_type = {
geojson: 'application/geo+json' geojson: 'application/geo+json'

View file

@ -3,6 +3,7 @@
# Pin npm packages by running ./bin/importmap # Pin npm packages by running ./bin/importmap
pin_all_from 'app/javascript/channels', under: 'channels' pin_all_from 'app/javascript/channels', under: 'channels'
pin_all_from 'app/javascript/maps', under: 'maps'
pin 'application', preload: true pin 'application', preload: true
pin '@rails/actioncable', to: 'actioncable.esm.js' pin '@rails/actioncable', to: 'actioncable.esm.js'

View file

@ -6,6 +6,16 @@
# to asset_path in the _favicon.html.erb partial. # to asset_path in the _favicon.html.erb partial.
Rails.application.config.assets.configure do |env| Rails.application.config.assets.configure do |env|
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 # Register .webmanifest files with the correct MIME type
env.register_mime_type 'application/manifest+json', extensions: ['.webmanifest'] # env.register_mime_type 'application/manifest+json', extensions: ['.webmanifest']
end end

View file

@ -38,6 +38,6 @@ namespace :webmanifest do
end end
# Hook to automatically generate webmanifest after assets:precompile # Hook to automatically generate webmanifest after assets:precompile
Rake::Task['assets:precompile'].enhance do # Rake::Task['assets:precompile'].enhance do
Rake::Task['webmanifest:generate'].invoke # Rake::Task['webmanifest:generate'].invoke
end # end