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

David Cook dcook at prosentient.com.au
Thu Mar 23 23:24:30 CET 2023


That all sounds good to me. 

 

I’m going to try to make more time for Koha next week. Envious of all the folk going to France. One day I hope to make it over there! 

 

I studied French in uni and I had originally planned to go to France instead of Australia but here we are haha. 

 

Looking forward to seeing all the Vue.js work coming out of the Hackfest!

 

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

 

From: Paul Derscheid <paul.derscheid at lmscloud.de> 
Sent: Thursday, 23 March 2023 8:30 PM
To: David Cook <dcook at prosentient.com.au>
Cc: Jonathan Druart <jonathan.druart at bugs.koha-community.org>; Koha Devel <koha-devel at lists.koha-community.org>
Subject: Re: [Koha-devel] Using Vue.js in Koha plugins

 

Yeah, that was Joubu’s conclusion as well. Better do it now, while it’s still manageable.

My suggestion is to build a shared component library with the generic stuff. I believe many of them are abstracted well enough to be used elsewhere.

Luckily, I have the chance to spend some time at Hackfest next week to dig into the setup further. Will keep you posted.

 

Best

 

Paul

 

--
LMSCloud GmbH
Paul Derscheid - Software Engineer
Bismarckstr. 3 -  D-72764 Reutlingen

m +49 174 2436308
e paul.derscheid at lmscloud.de <mailto:paul.derscheid at lmscloud.de> 
w www.lmscloud.de <http://www.lmscloud.de> 





On 23. Mar 2023, at 02:41, David Cook <dcook at prosentient.com.au <mailto:dcook at prosentient.com.au> > wrote:

 

I don’t know enough on this topic, but Vite does sound interesting. It was also created by the same person who created Vue.js so that’s handy.

 

The only issue I see is that we’re already using Webpack, although I suppose one could argue now is a good time to make changes if we’re going to make changes.

 

Using ES modules, I think that a person could use a Vue ESM build without it interfering with Koha’s Vue work, but the downside is that it wouldn’t have access to Koha’s Vue components…

 

I know there’s a bunch of Bugzilla tickets for Vue work at the moment, so I’m curious how some of the generic Vue work could fit. I’m guessing it’s all just going to be bundled into the individual Vue apps (like erm.js). But it would be great if the generic Vue components were available to any Vue app in Koha that wanted to use them – without a build step.

 

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

 

From: Paul Derscheid <paul.derscheid at lmscloud.de <mailto:paul.derscheid at lmscloud.de> > 
Sent: Thursday, 23 March 2023 12:49 AM
To: Jonathan Druart <jonathan.druart at bugs.koha-community.org <mailto:jonathan.druart at bugs.koha-community.org> >
Cc: David Cook <dcook at prosentient.com.au <mailto:dcook at prosentient.com.au> >; Koha Devel <koha-devel at lists.koha-community.org <mailto:koha-devel at lists.koha-community.org> >
Subject: Re: [Koha-devel] Using Vue.js in Koha plugins

 

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  <mailto:paul.derscheid at lmscloud.de> paul.derscheid at lmscloud.de
w  <http://www.lmscloud.de/> www.lmscloud.de






On 22. Mar 2023, at 14:04, Jonathan Druart < <mailto:jonathan.druart at bugs.koha-community.org> 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 < <mailto:dcook at prosentient.com.au> 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
 <mailto:Koha-devel at lists.koha-community.org> Koha-devel at lists.koha-community.org
 <https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website :  <https://www.koha-community.org/> https://www.koha-community.org/
git :  <https://git.koha-community.org/> https://git.koha-community.org/
bugs :  <https://bugs.koha-community.org/> https://bugs.koha-community.org/

 

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


More information about the Koha-devel mailing list