Skip to content

Plugins

Plugins are a way to add global-level functionality to Vue. They can add methods, components, or provide global state.

const MyPlugin = {
install(app) {
app.config.globalProperties.$myMethod = () => {/*...*/};
}
};
app.use(MyPlugin);