{"version":3,"file":"axios-pxydxlIp-601d0a.js","sources":["../../ClientSPA/src/boot/axios.ts"],"sourcesContent":["import { boot } from 'quasar/wrappers';\r\nimport axios, { AxiosInstance } from 'axios';\r\n\r\ndeclare module '@vue/runtime-core' {\r\n interface ComponentCustomProperties {\r\n $axios: AxiosInstance;\r\n $api: AxiosInstance;\r\n }\r\n}\r\n\r\n// Be careful when using SSR for cross-request state pollution\r\n// due to creating a Singleton instance here;\r\n// If any client changes this (global) instance, it might be a\r\n// good idea to move this instance creation inside of the\r\n// \"export default () => {}\" function below (which runs individually\r\n// for each client)\r\nconst api = axios.create({ baseURL: 'https://api.example.com' });\r\n\r\nexport default boot(({ app }) => {\r\n // for use inside Vue files (Options API) through this.$axios and this.$api\r\n\r\n app.config.globalProperties.$axios = axios;\r\n // ^ ^ ^ this will allow you to use this.$axios (for Vue Options API form)\r\n // so you won't necessarily have to import axios in each vue file\r\n\r\n app.config.globalProperties.$api = api;\r\n // ^ ^ ^ this will allow you to use this.$api (for Vue Options API form)\r\n // so you can easily perform requests against your app's API\r\n});\r\n\r\n// Export the axios instance to load config in other boot files\r\nexport { axios, api };\r\n"],"names":["api","axios","boot","app"],"mappings":"iDAgBA,MAAMA,EAAMC,EAAM,OAAO,CAAE,QAAS,0BAA2B,EAE/DA,EAAeC,EAAK,CAAC,CAAE,IAAAC,KAAU,CAG3BA,EAAA,OAAO,iBAAiB,OAASF,EAIjCE,EAAA,OAAO,iBAAiB,KAAOH,CAGrC,CAAC"}