vue.jsmeteor

integrate meteor in existing vue 3 application


I have created a small application with vue3 and quasar (using vue-cli as cli).
After some research I decided to use meteor because it brings a lot capabilities out of the box and seems like a nice fit for my project.

Unfortunately it seems that combining vue3 and meteor isn't that straightforward since meteor seems to only work with vue2 and the best known vue/meteor package isn't ported to vue3 yet.

I know that could use meteor only as backend which would be fine by me but after some research it's rather unclear how to achieve that.

Possible steps?

  1. Install meteor
  2. create meteor app
  3. remove everything client side related from project <- this step is unclear
  4. add something like SimpleDDP to vue to get meteors reactivity.
  5. meteor and vue would then be completly separated.

So the question is how can I use meteor together with vue3?


Solution

  • While I'm no Vue expert I believe you have two ways to pair Vue with Meteor.

    Full Stack Meteor+Vue: This method is pretty straight forward as you'd have Meteor encapsulate whatever front end framework you're using, and it seems that Akryum has a basic plugin for Vue3 integration.

    Unfortunately it seems that combining vue3 and meteor isn't that straightforward since meteor seems to only work with vue2 and the best known vue/meteor package isn't ported to vue3 yet.

    https://forums.meteor.com/t/team-up-to-create-the-new-vue-3-integration/53089/47?u=harry97

    https://github.com/meteor-vue/meteor-vue3/

    Vue + Meteor DDP API:

    This method isn't Vue specific as you're treating your Meteor application as an API-based back end that you're pulling data from. And if you'd like to use Meteor's DDP protocol you just have to find a library that can converse using this protocol in the same vein that you use something like got for HTTP requests. You can use SimpleDDP, ddp.js or asteroid and meteorman for debugging.