{"remainingRequest":"/Users/admin/projects/dms/src/dealer_admin/node_modules/thread-loader/dist/cjs.js!/Users/admin/projects/dms/src/dealer_admin/node_modules/babel-loader/lib/index.js!/Users/admin/projects/dms/src/dealer_admin/src/utils/error-log.js","dependencies":[{"path":"/Users/admin/projects/dms/src/dealer_admin/src/utils/error-log.js","mtime":1713161556000},{"path":"/Users/admin/projects/dms/src/dealer_admin/babel.config.js","mtime":1713161556000},{"path":"/Users/admin/projects/dms/src/dealer_admin/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/Users/admin/projects/dms/src/dealer_admin/node_modules/thread-loader/dist/cjs.js","mtime":499162500000},{"path":"/Users/admin/projects/dms/src/dealer_admin/node_modules/babel-loader/lib/index.js","mtime":456789000000}],"contextDependencies":[],"result":["import \"core-js/modules/es7.array.includes\";\nimport \"core-js/modules/es6.string.includes\";\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, a) {\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      console.error(err, info);\n    });\n  };\n}",null]}