Vuejs – Can I use an imported function in my global router.beforeEach

I am trying to use an imported function in my global router guard. But I’m getting this error: getCurrentStage is not defined getCurrentStage is imported from shops.js shop.js looks like this import axios from ‘axios’ export function getCurrentStage() { axios.get(“/admin/wine_app/shops”).then(response => { return response.data.current_stage; }); } export default getCurrentStage I then import it like this:…

Details