{"record":{"id":"0bbf180b7ad2829a","repo":"sveltejs/kit","slug":"to-enable-feature-name-add-the-following-to-yo","errorCode":null,"errorMessage":"To enable ${feature_name}, add the following to your SvelteKit plugin in `vite.config.js`:\\n\\n${result}","messagePattern":"To enable (.+?), add the following to your SvelteKit plugin in `vite\\.config\\.js`:\\\\n\\\\n(.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/kit/src/exports/vite/utils.js","lineNumber":226,"sourceCode":" *\t}\n *\\`\\`\\`\n *```\n * @param {string} feature_name\n * @param {string} path\n * @param {string} value\n * @returns {never}\n */\nexport function error_for_missing_config(feature_name, path, value) {\n\tconst hole = '__HOLE__';\n\n\tconst result = path.split('.').reduce((acc, part, i, parts) => {\n\t\tconst indent = '  '.repeat(i);\n\t\tconst rhs = i === parts.length - 1 ? value : `{\\n${hole}\\n${indent}}`;\n\n\t\treturn acc.replace(hole, `${indent}${part}: ${rhs}`);\n\t}, hole);\n\n\tthrow stackless(\n\t\tdedent`\\\n\t\t\tTo enable ${feature_name}, add the following to your SvelteKit plugin in \\`vite.config.js\\`:\n\n\t\t\t${result}\n\t\t`\n\t);\n}\n\n/** @type {EnforcedConfig} */\nexport const enforced_config = {\n\tappType: true,\n\tbase: true,\n\tbuild: {\n\t\tcssCodeSplit: true,\n\t\temptyOutDir: true,\n\t\tlib: {\n\t\t\tentry: true,\n\t\t\tname: true,","sourceCodeStart":208,"sourceCodeEnd":244,"githubUrl":"https://github.com/sveltejs/kit/blob/03f1687fe612ce3d2d9131139b5b188d9cf90c64/packages/kit/src/exports/vite/utils.js#L208-L244","documentation":"Configuration helper used across the SvelteKit Vite plugin: when a feature is detected in use (e.g. remote functions) but its required config flag is absent, error_for_missing_config renders the exact nested snippet to add — building the config path with indentation around a placeholder hole — and throws it stackless so the user can copy-paste the fix into their vite.config.js.","triggerScenarios":"Thrown at packages/kit/src/exports/vite/utils.js:226 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add the printed config snippet to the SvelteKit plugin options in vite.config.js","Set the suggested flag (e.g. experimental: { remoteFunctions: true }) matching the documented value"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"03f1687fe612ce3d2d9131139b5b188d9cf90c64","analyzedAt":"2026-09-02T02:01:50.504Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}