Posts made by Howard Miller

Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Follow up question - is it possible to load modules from a local (to my custom plugin) node_modules into javascript in amd/src and then build it? Does something like the following work (I haven't tried it)...
 
import something from 'local_myplugin/something';

I've seen code written the "old" way that uses M.cfg... to get paths but - again correct me if I'm wrong - I think that's deprecated YUI stuff? I could never get my head around YUI sad
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Oh ok... I'd forgotten about RequireJS. I'm not sure it helps me big grin
 
I have some stuff written as Vue.js components... which work but giving the Vue code access to core Javascript is currently a terrible bodge. I was trying to make it nicer starting with moving the build step from Vite to Grunt (which in some ways feels like a backward step). 
 
Maybe I'm gointg crazy...