Commit 313e2cf
committed
Make rescuable asset error classes configurable
Consumers may be using a different asset pipeline than sprockets-rails,
which means that when `Importmap::Map#resolve_asset_paths` invokes the
application's `asset_path` helper method, it may need to rescue
different exceptions than `Sprockets::Rails::Helper::AssetNotFound`. To
support that, we've added a `rescuable_asset_errors` property to the
importmap configuration options. We add
`Sprockets::Rails::Helper::AssetNotFound` to the array if
`Sprockets::Rails` is defined, which should allow the gem to work the
same as before in applications that use sprockets-rails. But now it'll
also be usable in applications that use something other than
sprockets-rails.1 parent 4e7eca7 commit 313e2cf
2 files changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
52 | 59 | | |
53 | 60 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
0 commit comments