1 import { createApp } from "vue";
2 import { createWebHistory, createRouter } from "vue-router";
3 import { createPinia } from "pinia";
5 import { library } from "@fortawesome/fontawesome-svg-core";
6 import { faPlus, faPencil, faTrash } from "@fortawesome/free-solid-svg-icons";
7 import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
9 library.add(faPlus, faPencil, faTrash);
11 import App from "./components/ERM/ERMMain.vue";
13 import { routes } from "./routes";
15 const router = createRouter({ history: createWebHistory(), routes });
17 import { useMainStore } from "./stores/main";
21 .component("font-awesome-icon", FontAwesomeIcon)
24 const mainStore = useMainStore();
25 const { removeMessages } = mainStore;
26 router.beforeEach((to, from) => {
27 removeMessages(); // This will actually flag the messages as displayed already