]> git.ipfire.org Git - thirdparty/vuejs/create-vue.git/commitdiff
fix(vitest): add transformMode config for jsx component test (#269)
authorlakb248 <lakb248@gmail.com>
Fri, 12 May 2023 15:12:43 +0000 (23:12 +0800)
committerGitHub <noreply@github.com>
Fri, 12 May 2023 15:12:43 +0000 (23:12 +0800)
template/config/vitest/vitest.config.js

index a2f57a5d5e8e226cc1a93515d7942b2c74bef0a7..3d9192133c0ff6abf26bb5363c9052c2eb011c35 100644 (file)
@@ -9,7 +9,10 @@ export default mergeConfig(
     test: {
       environment: 'jsdom',
       exclude: [...configDefaults.exclude, 'e2e/*'],
-      root: fileURLToPath(new URL('./', import.meta.url))
+      root: fileURLToPath(new URL('./', import.meta.url)),
+      transformMode: {
+        web: [/\.[jt]sx$/],
+      },
     }
   })
 )