How can you embed a simple Vue.js app as a widget on a non-Vue website?

Viewed 4654

I have a little tool built inside a Vue.js app that I want to use on another website as a small widget on an existing single page. The app is an internal app, and the client would like this one tool on their consumer website as well. (The consumer site only uses jQuery and Underscore currently.)

How can you embed a Vue component in an HTML element on an existing non-Vue webpage?

My Google searches so far seem to come up with only talk of embedding the app in an existing website as a full page, not specifically on an existing page. My one guess, looking at the dist directory the tool builds, you could try to pull out the code it makes, but I don't know if that will have conflicts with the non-Vue part of the page and seems very messy.

Thank you!

0 Answers
Related