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

docs: guide of extending vite config #1874

Merged
merged 2 commits into from
Aug 23, 2022
Merged

Conversation

luckylooke
Copy link
Contributor

I hit error:

Error: Failed to parse source for import analysis because the content contains invalid JS syntax. Install @vitejs/plugin-vue to handle .vue files.

Because vitest.config.ts literally replaces vite config, it is not obvious from docs. And usually you want only augment vite config I suppose.

Comment on lines 61 to 62
export default defineConfig(
mergeConfig(viteConfig, {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export default defineConfig(
mergeConfig(viteConfig, {
export default mergeConfig(viteConfig, defineConfig({

I guess this will make the type better.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

applied :)

docs/config/index.md Outdated Show resolved Hide resolved
@antfu antfu changed the title Guide how to extend vite config docs: guide of extending vite config Aug 23, 2022
@antfu antfu merged commit 4635c66 into vitest-dev:main Aug 23, 2022
@luckylooke luckylooke deleted the patch-1 branch August 23, 2022 18:37
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