Runable v1.0.0-alpha.20
Why Runable? Docs Modules Work with AI Blog About Changelog
  • 01Why Runable?
  • 02Docs
  • 03Modules
  • 04Work with AI
  • 05Blog
  • 06About
  • 07Changelog
Vue without a fixed server runtime.
Getting Started Structure Integrations Guide MCP API
  • Getting Started Structure Integrations Guide MCP API
Components
  • RunablePage
  • RunableLink
  • RunableLayout
  • ClientOnly
Composables
  • useAsyncData
  • useFetch
  • useConfig
  • useRuntime
  • useApp
  • useAppError
  • useRouter
  • useRoute
  • navigateTo
  • onBeforeRouteUpdate
  • injectHead
  • useHead
  • useSeoMeta
  • useHeadSafe
  • useSchemaOrg
Globals
  • $fetch
  • definePageMeta
  • defineVueMiddleware
  • defineVuePlugin
  • Vue APIs

defineVuePlugin

Declare a Runable plugin with injections, dependencies, and application hooks.

The short form receives a setup function directly:

// app/plugins/api.ts
export default defineVuePlugin(() => {
  return {
    provide: {
      apiBase: "/api",
    },
  };
});

The object form controls order and dependencies:

export default defineVuePlugin({
  name: "analytics",
  enforce: "post",
  dependsOn: ["auth"],
  setup(app) {
    app.provide("analytics", createAnalytics());
  },
  hooks: {
    "app:mounted"(app) {
      console.log("Application mounted", app);
    },
  },
});

enforce accepts pre or post. Values returned in provide are injected into Vue and added to global properties with a $ prefix.

Report an issue Edit this page
defineVueMiddleware

Declare one or more typed navigation middleware functions.

Vue APIs

Use common Vue functions without manual imports in a Runable application.

Runable

The Vue framework that brings productive conventions to any backend.

Product

  • Why Runable
  • Documentation
  • Installation
  • Integrations

Project

  • About
  • Blog
  • Changelog
  • Sponsor

Community

  • GitHub
  • Issues
  • Discussions
  • Bluesky

© 2026 Runable. Released under the MIT License.

Open source Built with Vue and Runable