Hi David,

I have not investigated how we could split and reuse Vue components
from Koha plugins.
But Paul Derscheid told me webpack is legacy and we should move to
Vite or Turbopack instead.

Cheers,
Jonathan

Le mar. 21 mars 2023 à 05:03, David Cook <dc...@prosentient.com.au> a écrit :
>
> Hey Jonathan,
>
>
>
> Do you think it would be possible to use Vue.js in Koha plugins?
>
>
>
> I haven’t played with webpack but it looks like 
> “koha-tmpl/intranet-tmpl/prog/js/vue/dist/erm.js” contains the entirety of 
> Vue.js in itself, so in theory it would be possible to include whatever 
> Vue.js on a different page that doesn’t load erm.js…
>
>
>
> Have we thought about separating out the core Vue.js library from the Vue.js 
> application code using the SplitChunksPlugin? That way we could include the 
> vue.js library code wherever we might want it, and only load the erm.js 
> application code on the ERM page(s). Perhaps we could split other re-usable 
> components out as well.
>
>
>
> Of course, the Koha plugin would be implementing its Vue.js application 
> without a build step. But I think that would be OK.
>
>
>
> I’m thinking of a scenario where the Koha plugin provides data via an API 
> endpoint, and wants to display that data using a Koha Vue DataTable for 
> instance.
>
>
>
> What do you think?
>
>
>
> David Cook
>
> Senior Software Engineer
>
> Prosentient Systems
>
> Suite 7.03
>
> 6a Glen St
>
> Milsons Point NSW 2061
>
> Australia
>
>
>
> Office: 02 9212 0899
>
> Online: 02 8005 0595
>
>
_______________________________________________
Koha-devel mailing list
Koha-devel@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : https://www.koha-community.org/
git : https://git.koha-community.org/
bugs : https://bugs.koha-community.org/

Reply via email to