Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rChaoz opened this issue Jan 24, 2025 · 0 comments
Open

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

rChaoz opened this issue Jan 24, 2025 · 0 comments
Labels

Comments

@rChaoz
Copy link
Contributor

rChaoz commented Jan 24, 2025

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),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants