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