Select2 >=4.0 in Plone5

Has anyone tried using this in Plone 5? It looks like Plone5 comes with an ancient version of select2 (2012!) that is pre 4.0 so it does not have some useful options. In particular dynamic tagging on a single value tag Dynamic option creation | Select2 - The jQuery replacement for select boxes. I'm under the assumption that trying to include a newer version of select2 will break the mockup patterns using the older version no?

IIRC from one of the virtual sprint chats in 2020, @MrTango put quite some effort in it himself to try to update select2 to the latest version.

But if I paraphrase him correctly, there were so many changes and work arounds needed on Select2 for the integration and to let it work properly with the CMS that he estimates it's quicker to create a custom related items frontend component from scratch in one of the available generic frontend libraries like Vue, Svelte or React.

@fredvd is right. But let me add a view notes to make it clear. Select2 can't be updated mainly, because we use it for the related items widget and for this advances use case there are a lot extensions in the behavior of Select2. After the refactoring of Select2 it's hard to archive the same behavior and proably not worth it. I think it would make more sense to build it new without Select2, it was not the right tool in the first place to build this. But this also mean, when we have another solution for the relateditems widget, we could update Select2 and use the newer version where it is actually working as intended. One probably need to check the other mockup patterns which are using Select2.