jamesmartin / inline_svg

Embed SVG documents in your Rails views and style them with CSS
MIT License
716 stars 73 forks source link

Support Shakapacker 8 #156

Closed tagliala closed 2 months ago

tagliala commented 6 months ago

Shakapacker 8 removed Webpacker spelling ref: shakacode/shakapacker#429

This is preventing CI to pass: https://github.com/diowa/icare/pull/1725

I'm working on a PR

leondmello commented 6 months ago

We faced the same issue, ended up adding a monkey patch via an initliazer

module InlineSvg
  class WebpackAssetFinder
    Webpacker = Shakapacker

    if Rails.env.development?
      class Shakapacker::DevServer
        def https? = false
      end
    end
  end
end
tagliala commented 6 months ago

@leondmello can you test this branch? https://github.com/tagliala/inline_svg/tree/feat/support-shakapacker

jamesmartin commented 2 months ago

Apologies for the lack of updates recently. I'll be moving forward with support for Shakapacker 8, roughly following the strategy outlined by @tagliala.

In addition, I'll be bumping this gem to 2.0, at which point it will drop official support for the older versions of Rails and will move to align with the official Rails maintenance policy, which means versions of Rails that have reached end-of-life will not be supported.

leondmello commented 1 day ago

@leondmello can you test this branch? https://github.com/tagliala/inline_svg/tree/feat/support-shakapacker

Thanks for the fix! Sorry, couldn't check this earlier.