Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: vitest merge config in form of callback #701

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

Closed
DingYuanhao wants to merge 1 commit into vuejs:main from DingYuanhao:fix-vitest-mergeConfig

Conversation

Copy link

@DingYuanhao DingYuanhao commented Mar 1, 2025

I got an vitest error using create-vue template:

Error: Vitest failed to start:
Error: Cannot merge config in form of callback
at mergeConfig (file://...)

Fixed it according to vitest's official documentation

image

Copy link
Member

But our vite config isn't defined as an function. Would you please open an issue with a runnable reproduction?

Copy link
Author

But our vite config isn't defined as an function. Would you please open an issue with a runnable reproduction?

Sorry, my mistake 😅 The issue lies with my vite.config.ts file, where I defined the Vite config in a functional way. I thought that defining the Vite config as mentioned in the PR would make it more universal. However, in this case, if it is not defined as a function, a new TypeScript error would be raised, even though Vitest runs successfully. Feel free to close the PR anyway :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /