{"record":{"id":"c0d889fb54b1a6a2","repo":"sveltejs/kit","slug":"the-keypath-option-is-deprecated-and-will-be","errorCode":null,"errorMessage":"The `${keypath}` option is deprecated, and will be removed in a future version","messagePattern":"The `(.+?)` option is deprecated, and will be removed in a future version","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/kit/src/core/config/options.js","lineNumber":333,"sourceCode":"\t)\n};\n\n/** @type {Validator<ValidatedConfig>} */\nexport const validate_options = object(options, true);\n\n/**\n * @param {Validator} fn\n * @param {(keypath: string) => string} get_message\n * @returns {Validator}\n */\nfunction deprecate(\n\tfn,\n\tget_message = (keypath) =>\n\t\t`The \\`${keypath}\\` option is deprecated, and will be removed in a future version`\n) {\n\treturn (input, keypath) => {\n\t\tif (input !== undefined) {\n\t\t\tconsole.warn(styleText(['bold', 'yellow'], get_message(keypath)));\n\t\t}\n\n\t\treturn fn(input, keypath);\n\t};\n}\n\n// Derive the names of SvelteKit's own config options from the schema, so they\n// stay in sync automatically. These are used to separate Kit's options from\n// `vite-plugin-svelte`'s options when config is passed via the Vite plugin.\nconst kit_defaults = validate_options({}, 'config');\n\n/** The names of the options that live under the `kit` namespace */\nexport const kit_options = Object.keys(kit_defaults);\n\n/** The names of the options that live under the `kit.experimental` namespace */\nexport const kit_experimental_options = Object.keys(kit_defaults.experimental);\n\n/**","sourceCodeStart":315,"sourceCodeEnd":351,"githubUrl":"https://github.com/sveltejs/kit/blob/03f1687fe612ce3d2d9131139b5b188d9cf90c64/packages/kit/src/core/config/options.js#L315-L351","documentation":"SvelteKit's config validator wraps deprecated option validators via `deprecate` in options.js and warns when a deprecated config option is set. It is a non-fatal console warning emitted during `vite dev`/`build` config validation. The option still works today but will be removed in a future version.","triggerScenarios":"Setting any option wrapped by `deprecate(...)` in svelte.config.js to a non-undefined value, e.g. a renamed or relocated option like an old `kit.*` or adapter option.","commonSituations":"Upgrading SvelteKit/adapter versions while keeping an old svelte.config.js; copying config snippets from outdated tutorials; typos that match a deprecated alias.","solutions":["Remove the deprecated option from svelte.config.js or rename it to the current option name shown in the SvelteKit docs/changelog","Regenerate config defaults with `npx sv create` or check `packages/kit/src/core/config/options.js` for what replaced the option","Silence temporarily by removing the key if you don't rely on its behavior"],"exampleFix":"// before\nconst config = { kit: { adapter: adapter(), someOldOption: true } };\n// after\nconst config = { kit: { adapter: adapter() } }; // option removed/renamed per migration guide","handlingStrategy":"validation","validationCode":"// before dev/build: scan svelte.config.js against current option names\nconst deprecated = ['someOldOption'];\nfor (const key of deprecated) if (key in config.kit) console.warn(`remove kit.${key}`);","typeGuard":"/** @returns {boolean} */ function hasDeprecatedOption(config, key) { return config?.kit && key in config.kit; }","tryCatchPattern":null,"preventionTips":["Read the SvelteKit changelog's breaking/deprecation section on every minor upgrade","Keep svelte.config.js minimal and regenerate it from new templates","Treat dev-server warnings as CI failures with a log-scan step"],"tags":["deprecation","config","sveltekit"],"backgroundTag":"deprecated-config-option","analyzedSha":"03f1687fe612ce3d2d9131139b5b188d9cf90c64","analyzedAt":"2026-09-02T02:01:50.504Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}