I’m poking at adding better webpacker support for engines. As part of that, I’ve been hunting around for ways to determine which engine is currently rendering a given view, and I’m coming up empty. The idea is this (and it may be stupid/too much magic, feel free to share your thoughts): if the view is in the main app, it should default to using the webpacker instance from the main app. If the view is in an engine, it should default to using the webpacker instance from the engine. My challenge is that, from the
I have two questions:
- Is there a way to do this today that I missed? Routes seem to work like this, but I’ve found that codebase a tad opaque.
- If not, and folks would be amenable to such a feature, can I get some pointers for where to start?