// src/utils/http.js
import axios from 'axios';
const axiosInstance = axios.create({
baseURL: process.env.VUE_APP_API_BASE_URL,
});
export default axiosInstance;''
when import the above module import http from './http'
does it create a new axios instance each time? or it is singleton?
"ES6 Modules are singletons - the instance is created when module is loaded."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With