fix(vite): incorrect JSX detection (#3342)

This commit is contained in:
Marvin Hagemeister
2025-09-05 12:17:12 +02:00
committed by GitHub
parent 7c5f209296
commit a892da2b0e
+1 -1
View File
@@ -3,7 +3,7 @@ import type { FsRouteFileNoMod, UniqueNamer } from "fresh/internal-dev";
import type { ImportCheck } from "./plugins/verify_imports.ts";
export const JS_REG = /\.([tj]sx?|[mc]?[tj]s)(\?.*)?$/;
export const JSX_REG = /\.[tj]sx?(\?.*)?$/;
export const JSX_REG = /\.[tj]sx(\?.*)?$/;
export function pathWithRoot(fileOrDir: string, root?: string): string {
if (path.isAbsolute(fileOrDir)) return fileOrDir;