-
-
Notifications
You must be signed in to change notification settings - Fork 101
Description
Continuing from discussions like rails/webpacker#3068
We are now raising an error when pack_tag helpers are used multiple times during the rendering. This solves hard to debug issues with double script loading, but it's fairly heavy handed approach, especially if we don't provide easy way to solve those issues. At the moment, users are required to roll out some custom logic to get all their packs in a single place.
We should look and see if we can improve the experience here in any way. Ideally calling *_pack_tag
multiple times would "just" work, but there's complexities here around load order, ideal placement of runtime check etc
As a first step, maybe simply adding a view helper to register additional packs that then get added in pack_tag call is enough to improve the experience?
Suggestions definitely welcome!