https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42150

--- Comment #22 from Arthur Suzuki <[email protected]> ---
Created attachment 196143
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196143&action=edit
Bug 42150: (follow-up) Share Vue via import map and handle frozen modules

Plugin-provided Vue SFCs need access to the same Vue runtime
that Koha uses for defineCustomElement. Without this, plugins
bundle their own Vue, creating two reactive systems that do
not interoperate (reactivity breaks silently).

- Re-export all of Vue from islands.esm.js so it serves as
  the single source of Vue APIs
- Add import map in main-container.inc mapping "vue" to
  islands.esm.js — plugin builds that externalize Vue now
  resolve to Koha's shared instance
- Clone frozen ES module exports before passing to
  defineCustomElement (module namespace objects are frozen
  per spec, but defineCustomElement needs to set properties)

To test:
1. Verify existing core islands still render (admin-menu,
   acquisitions-menu, vendor-menu).
2. Install the test plugin (test-islanddemo-0.1.0.kpz).
3. Navigate to any staff page and verify the Vue Island
   Demo component renders with styling.
4. Click the counter button repeatedly and verify the count
   updates reactively.
5. Open browser console — no errors except CSP report-only
   warnings.

Signed-off-by: Arthur Suzuki <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to