fix(vite): account for query params in module ids (#3257)

This commit is contained in:
Marvin Hagemeister
2025-08-26 09:35:27 +02:00
committed by GitHub
parent f1fe325c6d
commit a743b0c5d3
3 changed files with 8 additions and 3 deletions
+3
View File
@@ -1,6 +1,9 @@
import * as path from "@std/path";
import type { FsRouteFileNoMod, UniqueNamer } from "fresh/internal-dev";
export const JS_REG = /\.([tj]sx?|[mc]?[tj]s)(\?.*)?$/;
export const JSX_REG = /\.[tj]sx?(\?.*)?$/;
export function pathWithRoot(fileOrDir: string, root?: string): string {
if (path.isAbsolute(fileOrDir)) return fileOrDir;