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

fix: Ensure the root option provided by the user has higher priority (close #214) #217

Merged
merged 2 commits into from
Jul 27, 2021

Conversation

ElMassimo
Copy link
Collaborator

@ElMassimo ElMassimo commented Jul 27, 2021

Description 📖

This pull request ensures that when users provide the root option, it's used consistently when loading configuration files.

Background 📜

The root user option was introduced for projects where Vite's root does not match the project root, allowing files to be resolved correctly.

When the windi.config.ts file was introduced, files were correctly resolved using the user provided root.

In #129, the precedence was accidentally inverted when loading configuration files, which means configuration files would be resolved against the Vite root instead (see the first problem described in #214).

@ElMassimo ElMassimo requested a review from antfu July 27, 2021 16:50
@antfu antfu merged commit cb0768f into main Jul 27, 2021
@antfu antfu deleted the fix-root-fallback branch July 27, 2021 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants