https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43285 Bug ID: 43285 Summary: Add Koha Plugin JS ESM module registry and loader Initiative type: --- Sponsorship --- status: Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Plugin architecture Assignee: koha-bugs@lists.koha-community.org Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org CC: kyle@bywatersolutions.com, martin.renvoize@openfifth.co.uk, tomascohen@gmail.com Target Milestone: --- There's been really cool work done on having Koha plugins add Vue.js content to Koha. See the following: Bug 42150 - Allow plugins to register Vue islands via registerIsland() Bug 42189 - Allow plugins to inject dashboard widgets via a shared Vue widget registry However, they rely on the existing intranet_js hook which means they need to generate HTML to be injected as <script> elements into Koha templates. While functional, it's not as optimal and seamless as it could be. -- I'm proposing a Koha core API endpoint which will return URLs to Javascript modules (specifically ESMs) based on a provided "context key". A Koha page will query this API endpoint with a context key like "smtp_servers" or "catalogue-detail" or whatever really. The API endpoint will then invoke a Koha Plugin Perl plugin hook like "esm_module_provider" (or whatever), which will compile of list of URLs of ESMs from Koha Plugins to load dynamically into that Koha HTML page. This is pure Javascript with no HTML created via Perl. When combined with "Bug 26129 - Add a new 'configurations' table", this could be an extremely powerful tool for customizing Koha using plugins, especially with a Javascript + API driven model. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.