I created the app with the latest Vue cli and I'm trying to register a global custom directive with no success. Can someone maybe tell me what I'm doing wrong 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");

 
    