Skip to content

Commit 7eeda68

Browse files
Replace require_dependency with require in preview loading
Co-authored-by: joelhawksley <1940294+joelhawksley@users.noreply.github.com> Agent-Logs-Url: https://github.com/ViewComponent/view_component/sessions/5093a33f-8097-4d82-a75d-c3b92b7f9a27
1 parent 7296b43 commit 7eeda68

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

docs/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ nav_order: 6
1010

1111
## main
1212

13+
* Replace deprecated `require_dependency` with `require` in preview loading.
14+
15+
*GitHub Copilot*
16+
1317
## 4.5.0
1418

1519
* Fix initialization ordering issue causing missing asset errors in Sprockets.

lib/view_component/preview.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def preview_example_template_path(example)
9595
# @private
9696
def __vc_load_previews
9797
Array(preview_paths).each do |preview_path|
98-
Dir["#{preview_path}/**/*preview.rb"].sort.each { |file| require_dependency file }
98+
Dir["#{preview_path}/**/*preview.rb"].sort.each { |file| require file }
9999
end
100100
end
101101

0 commit comments

Comments
 (0)