Prevent reloading of SRI helpers in development
Otherwise, each code reload would re-add the SRI helpers and thus break the inclusion of asset tags.
This commit is contained in:
@ -26,4 +26,6 @@ module Webpacker::SriManifestExtensions
|
||||
end
|
||||
end
|
||||
|
||||
Webpacker::Manifest.prepend(Webpacker::SriManifestExtensions)
|
||||
if Webpacker::Manifest.ancestors.map(&:name).exclude?(Webpacker::SriManifestExtensions.name)
|
||||
Webpacker::Manifest.prepend(Webpacker::SriManifestExtensions)
|
||||
end
|
||||
|
Reference in New Issue
Block a user