Skip to main content
Vue is a progressive framework for building user interfaces. Meteor provides excellent integration with Vue through specialized packages, combining Vue’s reactive components with Meteor’s real-time data layer.

Installation

Create a new Vue app with Meteor:
Or add Vue to an existing project:
For Single File Component (.vue) support:

Project Structure

A typical Vue+Meteor app consists of:

Basic Setup

HTML Template

Create /client/main.html with the app container:

Client Entry Point

Initialize Vue in /client/main.js:

Root Component

Create /client/App.vue:

Reactive Data Integration

Integrate Meteor’s reactive data system with Vue using vue-meteor-tracker:

Plugin Setup

Register the plugin in /client/main.js:

Using Meteor Reactivity

The meteor option in Vue components provides reactive Meteor data:

Collections and Publications

Define a collection in /imports/collections/Time.js:

Router Integration

Vue Router works seamlessly with Meteor:

Router Configuration

Using the Router

In your root component:

Server-Side Rendering (SSR)

Meteor supports Vue SSR using the akryum:vue-ssr package:

Basic SSR Setup

In /server/main.js:

SSR with Routing

Async Data Hydration

For components with async data requirements:

Client Hydration

In /client/main.js:

Composition API

Vue 3 Composition API works perfectly with Meteor:

Best Practices

Always remove the autopublish package in production:
This ensures you explicitly control what data is published to clients.
Use <style scoped> in .vue files to prevent style leakage:
Return cursors directly from meteor helpers for automatic reactivity:
Use $subReady to show loading states:

Style Guide

Follow both guides for best results:

Meteor Style Guide

Meteor’s code style and structure recommendations

Vue Style Guide

Vue’s official style guide and best practices

Resources

Vue Tutorial

Step-by-step tutorial for building Vue apps with Meteor

Vue Meteor Tracker

Integration package for Vue and Meteor reactivity

Vue Documentation

Official Vue 3 documentation and guides

Vue SSR Guide

Server-side rendering with Vue