feat(vite): check valid imports per environment (#3299)

Fixes https://github.com/denoland/fresh/issues/3296
This commit is contained in:
Marvin Hagemeister
2025-09-01 17:30:30 +02:00
committed by GitHub
parent 5d052c0fdb
commit ff9db336f7
11 changed files with 291 additions and 35 deletions
+2
View File
@@ -1,5 +1,6 @@
import * as path from "@std/path";
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?(\?.*)?$/;
@@ -41,6 +42,7 @@ export interface FreshViteConfig {
routeDir?: string;
ignore?: RegExp[];
islandSpecifiers?: string[];
checkImports?: ImportCheck[];
}
export type ResolvedFreshViteConfig =