Premailer no longer needs to do a lookup, we can directly load the file

This commit is contained in:
Renaud Chaput 2025-04-22 18:54:24 +02:00
parent 383f6b7a4e
commit f1aa3970d3
No known key found for this signature in database
GPG Key ID: BCFC859D49B46990

View File

@ -15,12 +15,7 @@ module PremailerBundledAssetStrategy
headers
).presence
else
# Read the file from filesystem
vite_path = ViteRuby.instance.manifest.path_for(url)
return unless vite_path
path = Rails.public_path.join(vite_path.delete_prefix('/'))
path = Rails.public_path.join(url.delete_prefix('/'))
return unless path.exist?
path.read