rubyatscale/packs-rails

Eager load paths

andrewmarkle opened this issue ยท 3 comments

Hey there. Thanks so much for creating this gem! It's lowered the bar for getting started with packwerk. One question that I had though is around eager_loading. In all rails application everything in app/* gets eager loaded by default. But I don't think stimpack follows this convention... at least I couldn't figure out if it does or not by reading through the code.

Could be looking in the wrong place but when I query Rails.application.config.eager_load_paths in our application none of the packs/*/app/ folders show up in there.

They'll only appear there if config.eager_load is set to true. By default packs-rails augments the config.paths config to add pack paths, none of those paths are eager loaded by default unless config.eager_load is true (usually only the case in production, not development or test.

Hey @andrewmarkle I noticed we somehow missed this issue from many months ago โ€“ apologies for that. Please let me know if you are still having this issue or if @TastyPi 's suggestion resolved things for you! Otherwise I'll close this issue out if we don't hear back from you ๐Ÿ™

Makes sense! I think I was confused how that worked...but appreciate I the reply. I'll close this one. ๐Ÿ‘Œ