{"remainingRequest":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/thread-loader/dist/cjs.js!/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/babel-loader/lib/index.js!/data/jenkins/workspace/mer.ws.baibaodun.com.cn/src/utils/error-log.js","dependencies":[{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/src/utils/error-log.js","mtime":1701742078551},{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/babel.config.js","mtime":1701742078504},{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/thread-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/mer.ws.baibaodun.com.cn/node_modules/babel-loader/lib/index.js","mtime":456789000000}],"contextDependencies":[],"result":["// +----------------------------------------------------------------------\n// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]\n// +----------------------------------------------------------------------\n// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.\n// +----------------------------------------------------------------------\n// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权\n// +----------------------------------------------------------------------\n// | Author: CRMEB Team <admin@crmeb.com>\n// +----------------------------------------------------------------------\n\nimport Vue from 'vue';\nimport store from '@/store';\nimport { isString, isArray } from '@/utils/validate';\nimport settings from '@/settings';\n\n// you can set in settings.js\n// errorLog:'production' | ['production', 'development']\nvar needErrorLog = settings.errorLog;\nfunction checkNeed() {\n  var env = process.env.NODE_ENV;\n  if (isString(needErrorLog)) {\n    return env === needErrorLog;\n  }\n  if (isArray(needErrorLog)) {\n    return needErrorLog.includes(env);\n  }\n  return false;\n}\nif (checkNeed()) {\n  Vue.config.errorHandler = function (err, vm, info) {\n    // Don't ask me why I use Vue.nextTick, it just a hack.\n    // detail see https://forum.vuejs.org/t/dispatch-in-vue-config-errorhandler-has-some-problem/23500\n    Vue.nextTick(function () {\n      store.dispatch('errorLog/addErrorLog', {\n        err: err,\n        vm: vm,\n        info: info,\n        url: window.location.href\n      });\n    });\n  };\n}",null]}