{"record":{"id":"f035ace60bc87ec2","repo":"Meituan-Dianping/mpvue","slug":"do-not-replace-the-vue-config-object-set-individu","errorCode":null,"errorMessage":"Do not replace the Vue.config object, set individual fields instead.","messagePattern":"Do not replace the Vue\\.config object, set individual fields instead\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/global-api/index.js","lineNumber":26,"sourceCode":"import { set, del } from '../observer/index'\nimport { ASSET_TYPES } from 'shared/constants'\nimport builtInComponents from '../components/index'\n\nimport {\n  warn,\n  extend,\n  nextTick,\n  mergeOptions,\n  defineReactive\n} from '../util/index'\n\nexport function initGlobalAPI (Vue: GlobalAPI) {\n  // config\n  const configDef = {}\n  configDef.get = () => config\n  if (process.env.NODE_ENV !== 'production') {\n    configDef.set = () => {\n      warn(\n        'Do not replace the Vue.config object, set individual fields instead.'\n      )\n    }\n  }\n  Object.defineProperty(Vue, 'config', configDef)\n\n  // exposed util methods.\n  // NOTE: these are not considered part of the public API - avoid relying on\n  // them unless you are aware of the risk.\n  Vue.util = {\n    warn,\n    extend,\n    mergeOptions,\n    defineReactive\n  }\n\n  Vue.set = set\n  Vue.delete = del","sourceCodeStart":8,"sourceCodeEnd":44,"githubUrl":"https://github.com/Meituan-Dianping/mpvue/blob/6c5d78ee04f58c6d782c456dfcf0fe63c0b7f89b/src/core/global-api/index.js#L8-L44","documentation":"Vue.config is exposed via Object.defineProperty with only a getter; this warning comes from the dev-only setter trap that fires when code assigns to the Vue.config property as a whole (Vue.config = {...}). The assignment is silently discarded — the real config object is untouched — because replacing it would break the reactive internal references held throughout the framework.","triggerScenarios":"Thrown at src/core/global-api/index.js:26 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set individual fields instead: Vue.config.silent = true, Vue.config.devtools = false, etc.","If you need many changes, assign them one by one or use Object.assign(Vue.config, myOverrides) — never reassign Vue.config itself","Audit build scripts and third-party plugins that try to wholesale replace Vue.config"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c5d78ee04f58c6d782c456dfcf0fe63c0b7f89b","analyzedAt":"2026-09-02T05:17:40.946Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T11:17:12.671Z"}