[Koha-devel] Using Vue.js in Koha plugins

Paul Derscheid paul.derscheid at lmscloud.de
Wed Mar 22 14:49:25 CET 2023


Hi all,

this can also be achieved with webpack (but let’s not do that). 

I suggest the change because webpack isn’t actively developed anymore.
Don’t let the commits on the repo fool you. Since Vercel got Tobias Koppers, all of the innovative work happens on turbopack.

Meanwhile vite has replaced webpack as the de facto standard in the whole industry.

Best

Paul

--
LMSCloud GmbH
Paul Derscheid - Software Engineer
Bismarckstr. 3 -  D-72764 Reutlingen
m +49 174 2436308
e paul.derscheid at lmscloud.de
w www.lmscloud.de

> On 22. Mar 2023, at 14:04, Jonathan Druart <jonathan.druart at bugs.koha-community.org> wrote:
> 
> 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 <dcook at 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 at 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/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20230322/d0b046c2/attachment.htm>


More information about the Koha-devel mailing list