0Pricing
Frontend Academy · Lesson

Plugin System: app.use()

Create a Vue plugin as an object with an install method, register global components, directives, and provide values to the entire application.

What Is a Vue Plugin?

A plugin is reusable functionality you install into a Vue app: global components, directives, provide values, prototype-style helpers (router, i18n, pinia). Plugins are how libraries integrate with Vue.

Plugin Shape

A plugin is an object with an install(app, options) method — or a function that acts as the install method.

// MyPlugin.ts
export default {
  install(app, options) {
    // Configure things here
  }
};

All lessons in this course

  1. provide() and inject() for Dependency Injection
  2. Async Components and Suspense
  3. Custom Directives
  4. Plugin System: app.use()
← Back to Frontend Academy