README.md in inline_svg-1.5.1 vs README.md in inline_svg-1.5.2

- old
+ new

@@ -12,12 +12,24 @@ Inline SVG supports: - [Rails 3](http://weblog.rubyonrails.org/2010/8/29/rails-3-0-it-s-done/) (from [v0.12.0](https://github.com/jamesmartin/inline_svg/releases/tag/v0.12.0)) - [Rails 4](http://weblog.rubyonrails.org/2013/6/25/Rails-4-0-final/) - [Rails 5](http://weblog.rubyonrails.org/2016/6/30/Rails-5-0-final/) (from [v0.10.0](https://github.com/jamesmartin/inline_svg/releases/tag/v0.10.0)) -- [Rails 6](https://weblog.rubyonrails.org/2019/4/24/Rails-6-0-rc1-released/) with Sprockets or Webpacker (from [v1.5.0](https://github.com/jamesmartin/inline_svg/releases/tag/v1.5.0)). +- [Rails 6](https://weblog.rubyonrails.org/2019/4/24/Rails-6-0-rc1-released/) with Sprockets or Webpacker (from [v1.5.2](https://github.com/jamesmartin/inline_svg/releases/tag/v1.5.2)). +## Webpacker + + +Webpacker support is currently "opt-in" and must be manually configured like +so: + +```ruby +InlineSvg.configure do |config| + config.asset_finder = InlineSvg::WebpackAssetFinder +end +``` + ## Changelog This project adheres to [Semantic Versioning](http://semver.org). All notable changes are documented in the [CHANGELOG](https://github.com/jamesmartin/inline_svg/blob/master/CHANGELOG.md). @@ -303,32 +315,9 @@ is not found: ```ruby InlineSvg.configure do |config| config.raise_on_file_not_found = true -end -``` - -## Sprockets and Webpacker - -Inline SVG supports SVGs bundled by either Sprockets or Webpacker, however, be -aware that the gem will *always* attempt to find SVGs using Sprockts if it is -enabled. - -By default, Inline SVG will use Sprockets to find SVG files if it is enabled in -your Rails project. - -If you have upgraded an older Rails project from Sprockets to Webpacker and you -no longer want to use Sprockets at all, you should disable the Asset Pipeline -and Inline SVG will use Webpacker automatically. - -If you have both Sprockets *and* Webpacker enabled for some reason and you want -Inline SVG to use Webpacker to find SVGs then you should configure the -`asset_finder` appropriately: - -```ruby -InlineSvg.configure do |config| - config.asset_finder = InlineSvg::WebpackAssetFinder end ``` ## Contributing