Skip to content

Commit

Permalink
修复vitest测试jsx/tsx组件失败的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
linhy29 committed Mar 11, 2022
1 parent c4e94c2 commit 5329456
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tsconfig.vite-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"include": ["vite.config.*"],
"compilerOptions": {
"composite": true,
"types": ["node", "vitest"]
"types": ["node", "vitest/globals"]
}
}

5 changes: 5 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,10 @@ export default defineConfig(async ({ mode }) => {
build: {
brotliSize: false,
},
test: {
transformMode: {
web: [/\.[jt]sx$/],
},
},
}
})

0 comments on commit 5329456

Please sign in to comment.