I recently built my app using the Vue cli and I'm having trouble registering a global custom directive. Can anyone point out what I might be doing incorrectly here?
import { createApp } from "vue";
import App from "./App.vue";
import "./registerServiceWorker";
import router from "./router";
import store from "./store";
const app = createApp(App);
app.directive("highlight", {
beforeMount(el, binding, vnode) {
el.style.background = binding.value;
},
});
app
.use(store)
.use(router)
.mount("#app");