[Vuejs]-Export default async function haven't execute the whole function during import in another js

0👍

Because you’re exporting an async method you need to wait for it.

const axiosInstance = await http
return axiosInstance.get("/getAllRegisteredProducts");

Of course you need to call this from an async context.

Leave a comment