fix: eliminate Vite config loader warning in tests - #1068
Merged
Conversation
EhabY
force-pushed
the
fix/test-warnings
branch
from
August 6, 2026 00:16
0c982ba to
47b3b48
Compare
EhabY
force-pushed
the
fix/test-warnings
branch
from
August 10, 2026 13:12
47b3b48 to
45c1dbe
Compare
DanielleMaywood
approved these changes
Aug 10, 2026
DanielleMaywood
left a comment
Collaborator
There was a problem hiding this comment.
Change looks fine although doesn't match PR description and title. There are no changes with regard to React act warnings
Collaborator
Author
Oh I rebased and the rebase contained this fix already so it's no longer valid lol |
Rename vitest.config.ts to .mts and replace __dirname with import.meta.dirname so Vite loads the config as ESM, resolving the native configLoader deprecation warning. The React act() warnings originally addressed alongside this were fixed on main in #1047.
EhabY
force-pushed
the
fix/test-warnings
branch
from
August 10, 2026 16:50
45c1dbe to
e53cde7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
pnpm testprinted a Vite config loader warning (3x):vitest.config.tsuses ESM syntax but the rootpackage.jsonhas"type": "commonjs", so Vite loads it as CJS and warns about the upcomingconfigLoader: "native"default.Changes
vitest.config.ts→vitest.config.mtsand replace__dirnamewithimport.meta.dirname. This makes the config unambiguously ESM, silencing the warning.Verification
pnpm typecheck,pnpm lint, andpnpm format:checkpass.Generated by Coder Agents