Skip to content

The following Vite config options will be overridden by SvelteKit: root #13376

@rChaoz

Description

@rChaoz

Describe the bug

This warning pops up when running vitest on Windows. It seems like the config() function of the Kit Vite plugin runs multiple times, and that paths are normalized (possibly since Vite 6?). The warning comes from this line:

if (config[key] !== resolved_config[key]) {

where, for me, the configs have these values:

  • config.root = C:/Users/.../project-dir
  • resolved_config.root = C:\Users\...\project-dir

So, the 2 configs have the same path, but one with forward slashes, and one with backslashes.
SvelteKit itself tries to set config.root to the version with backslashes, as it uses process.cwd() to get it. Maybe it should use posixify() on it before? Replacing this line:

with this:

	root: posixify(cwd),

Metadata

Metadata

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions