Does anyone have any best practices or tips on how to separate your code and manage manifest files when you want some Stimulus controllers only available to an admin area and some only available to a public area? Best I can think of right now is to have public or shared controllers live where they do by default and a subfolder for the admin area with a separate manifest file. Then when Rails generates a new controller, and updates the general manifest file, you do what’s needed to move the admin registration lines to the admin manifest file. Then in your separate application.js and admin.js files you require the pertinent manifest file.
Tedious but all I can think of right now.
Does anyone else do this or have better a way?
matte