{"record":{"id":"f1b07b2d146c357e","repo":"Meituan-Dianping/mpvue","slug":"it-seems-you-are-using-the-standalone-build-of-vue","errorCode":null,"errorMessage":"It seems you are using the standalone build of Vue.js in an environment with Content Security Policy that prohibits unsafe-eval. The template compiler cannot work in this environment. Consider relaxing the policy to allow unsafe-eval or pre-compiling your templates into render functions.","messagePattern":"It seems you are using the standalone build of Vue\\.js in an environment with Content Security Policy that prohibits unsafe-eval\\. The template compiler cannot work in this environment\\. Consider relaxing the policy to allow unsafe-eval or pre-compiling your templates into render functions\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/compiler/to-function.js","lineNumber":39,"sourceCode":"  const cache: {\n    [key: string]: CompiledFunctionResult;\n  } = Object.create(null)\n\n  return function compileToFunctions (\n    template: string,\n    options?: CompilerOptions,\n    vm?: Component\n  ): CompiledFunctionResult {\n    options = options || {}\n\n    /* istanbul ignore if */\n    if (process.env.NODE_ENV !== 'production') {\n      // detect possible CSP restriction\n      try {\n        new Function('return 1')\n      } catch (e) {\n        if (e.toString().match(/unsafe-eval|CSP/)) {\n          warn(\n            'It seems you are using the standalone build of Vue.js in an ' +\n            'environment with Content Security Policy that prohibits unsafe-eval. ' +\n            'The template compiler cannot work in this environment. Consider ' +\n            'relaxing the policy to allow unsafe-eval or pre-compiling your ' +\n            'templates into render functions.'\n          )\n        }\n      }\n    }\n\n    // check cache\n    const key = options.delimiters\n      ? String(options.delimiters) + template\n      : template\n    if (cache[key]) {\n      return cache[key]\n    }\n","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/Meituan-Dianping/mpvue/blob/6c5d78ee04f58c6d782c456dfcf0fe63c0b7f89b/src/compiler/to-function.js#L21-L57","documentation":"Error \"It seems you are using the standalone build of Vue.js in an environment with Content Security Policy that prohibits unsafe-eval. The template compiler cannot work in this environment. Consider relaxing the policy to allow unsafe-eval or pre-compiling your templates into render functions.\" thrown in Meituan-Dianping/mpvue.","triggerScenarios":"Thrown at src/compiler/to-function.js:39 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Relax the CSP to allow 'unsafe-eval' for script-src","Precompile templates into render functions using vue-loader / vueify so the runtime compiler is never invoked","Switch to the runtime-only build which has no compiler and avoids new Function entirely"],"exampleFix":null,"handlingStrategy":"fallback","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"}