Skip to content
简体中文

@mitojs/vue

This guide preserves integration examples from earlier SDK releases. Version 4 requires an ES2015-capable runtime and drops Internet Explorer support. Open the v4 quickstart

Both examples use MitoJS 4.0.0 and capture demo reports locally, without a production backend.

If you want to import in weixin miniprograme,please replace @mitojs/browser to @miotjs/wx-mini

Terminal window
# using npm
npm i @mitojs/vue @mitojs/browser
# using yarn
yarn add @mitojs/vue @mitojs/browser
// main.js
import Vue from 'vue'
import { init } from '@mitojs/browser'
import { vuePlugin } from '@mitojs/vue'
// multiple instances
const MitoInstance = init({
vue: Vue,
dsn: 'https://test.com/yourInterface',
maxBreadcrumbs: 100
},[vuePlugin])
// main.ts
import { createApp } from 'vue'
import App from './App.vue'
import { init } from "@mitojs/browser";
import { vuePlugin } from "@mitojs/vue";
const app = createApp(App)
const MitoInstance = init({
vue: app,
dsn: 'https://test.com/yourInterface',
maxBreadcrumbs: 100
},[vuePlugin])