While I was very optimistic about Vue Single File Components (SFCs) a few posts ago, I’ve been having some trouble implementing them in LibGuides. While you can upload whatever JavaScript you want to a LibGuides group (as “Customization Files”), I’m beginning to realize that the LibGuides interface really wasn’t meant to accommodate a SFC workflow. As developer experience (DX), attempting to use SFCs in LibGuides is trying to put a square peg into a round hole. While you’d ultimately want to automate your JavaScript build process, LibGuides actively works against this. You’re left moving a lot of files around manually, which is not ideal. It gets confusing.
Nonetheless, I learned a lot about Vue components as I slowly figured this out. I was able to take the methods I wrote for my SFCs and re-implement them in regular old components while drawing upon Vue from a CDN. LibGuides is much more suited to this approach. You lose scoped CSS and some nice build features, but as far as I can tell, that’s about it. I can keep my components in the Customization Files, and cut out the build process entirely. It’s the best approach I’ve found so far to integrate Vue into LibGuides.