config folder New global.js
const BASE_URL = 'http://xxxxxxx'
export default {
BASE_URL
}
main.js added to the global
import global_ from '../config/global'
Vue.prototype.GLOBAL = global_;
Components in use:
created() {
console.log(this.GLOBAL.BASE_URL)
},