UMD for a single component?



  • I’ve got an interesting use case. I’ve made Vue SPAs before but never have had to implement something of this nature.

    We’re developing this project to be deployed as a cordova mobile app, a web app, a UWP app, and we also need to integrate a specific portion into our existing project.

    I’ve really got no idea where to start with the “inject into existing project” portion. Ideally we could transpile a component into a JS+CSS file, include that into our existing project, and then call something like Component.open(params); in our native JS, which would ideally open the component in a fullscreen modal/overlay.

    Now, I know with a native component I could do something like Component().$mount('div'); to mount it to the overlay, however I’m not quite sure on where I should start to add/change tooling so I can export this specific component into a format that isn’t SPA and is just a component. I know this is a very abnormal use case so I’m just putting feelers out there.

    I thought Quasar’s UMD was what I was looking for but I’m not so sure. Ideally I want to be able to export just a single component and then use it like I would via a router. Right now the current solution I’ve implemented is just an iframe, but it is far from ideal.



  • Ah. I think I’ve got a solution that is workable. Loading the iframe in the background and communicating via sendMessage.


Log in to reply