rails / mission_control-jobs

Dashboard and Active Job extensions to operate and troubleshoot background jobs
MIT License
611 stars 71 forks source link

Add prefix to JS assets #175

Closed manuelmeurer closed 3 weeks ago

manuelmeurer commented 1 month ago

I noticed that MCJ overwrites some of my app's importmap includes, e.g.

"controllers": "https://myapp.com/assets/controllers/index-be0771f7.js"

becomes

"controllers": "https://myapp.com/assets/mission_control/jobs/controllers/index-77c24c3f.js"

after including this gem.

This PR fixes that by prefixing all JS assets with "mcj-" and preloading them only when the "mcj" entry point is loaded.

manuelmeurer commented 1 month ago

I recommend merging #163 instead of this PR, it implements a completely separate importmap, which is a cleaner option.

rosa commented 3 weeks ago

I recommend merging https://github.com/rails/mission_control-jobs/pull/163 instead of this PR, it implements a completely separate importmap, which is a cleaner option.

Agree! Thank you so much for this one, in any case, and thanks for your patience while I was busy with other stuff 🙏