highlightjs / vue-plugin

Highlight.js Vue Plugin
BSD 3-Clause "New" or "Revised" License
201 stars 27 forks source link

Allow user to inject their own hljs instance #12

Closed Trinovantes closed 3 years ago

Trinovantes commented 3 years ago

Resolves #1

In hindsight, this might not even be necessary. While debugging why injection was not working for me, I realized this plugin and my test app was using different singletons of Vue too. I was able to fix it by adding a resolve alias to my webpack config which means it's also applicable to fixing different versions of highlight.js as well.

joshgoebel commented 3 years ago

Thanks for work on this, added a few questions/thoughts.

joshgoebel commented 3 years ago

I'd love if we could find another Vue.js person to look this over... at a quick glance though it seems OK to me...

Trinovantes commented 3 years ago

Closing this in favor of #17