File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed
test_app/config/initializers Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -51,4 +51,11 @@ class Webpacker::Engine < ::Rails::Engine
51
51
app . config . javascript_path = Webpacker . config . source_path . relative_path_from ( Rails . root . join ( "app" ) ) . to_s
52
52
end
53
53
end
54
+
55
+ initializer "webpacker.remove_app_packs_from_the_autoload_paths" do
56
+ Rails . application . config . before_initialize do
57
+ source_path = Webpacker . config . source_path . to_s
58
+ ActiveSupport ::Dependencies . autoload_paths . delete ( source_path )
59
+ end
60
+ end
54
61
end
Original file line number Diff line number Diff line change
1
+ $test_app_autoload_paths_in_initializer = ActiveSupport ::Dependencies . autoload_paths
Original file line number Diff line number Diff line change @@ -27,4 +27,8 @@ def dev_server.running?; true; end
27
27
assert Webpacker . inlining_css?
28
28
end
29
29
end
30
+
31
+ def test_app_autoload_paths_cleanup
32
+ assert_empty $test_app_autoload_paths_in_initializer
33
+ end
30
34
end
You can’t perform that action at this time.
0 commit comments