Skip to content

Commit 0342127

Browse files
authored
fix(vitest): add transformMode config for jsx component test (#269)
1 parent c4e0f15 commit 0342127

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: template/config/vitest/vitest.config.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ export default mergeConfig(
99
test: {
1010
environment: 'jsdom',
1111
exclude: [...configDefaults.exclude, 'e2e/*'],
12-
root: fileURLToPath(new URL('./', import.meta.url))
12+
root: fileURLToPath(new URL('./', import.meta.url)),
13+
transformMode: {
14+
web: [/\.[jt]sx$/],
15+
},
1316
}
1417
})
1518
)

0 commit comments

Comments
 (0)