mirror of
https://github.com/vitest-dev/vitest.git
synced 2025-12-08 18:26:03 +00:00
fix: use client transform for jsx/tsx
This commit is contained in:
parent
5e1c47a627
commit
d726243a0a
@ -1,7 +1,7 @@
|
||||
import type { ViteDevServer } from 'vite'
|
||||
|
||||
export async function transformRequest(server: ViteDevServer, id: string) {
|
||||
if (id.match(/\.(?:[cm]?[jt]sx?|json)$/)) {
|
||||
if (id.match(/\.(?:[cm]?[jt]s|json)$/)) {
|
||||
return await server.transformRequest(id, { ssr: true })
|
||||
}
|
||||
else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user