Update excluded pages paths logic. Add HMR retries on errors.

This commit is contained in:
2026-04-12 05:47:12 +01:00
parent e0c2ab5872
commit 532d0d6b56
29 changed files with 168 additions and 65 deletions
+10 -5
View File
@@ -36,18 +36,23 @@ export type PageModule = {
staticParams: StaticParams;
};
export type BunextConfig = {
distDir?: string;
assetsPrefix?: string;
dist_dir?: string;
assets_prefix?: string;
origin?: string;
globalVars?: {
global_vars?: {
[k: string]: any;
};
port?: number;
development?: boolean;
middleware?: (params: BunextConfigMiddlewareParams) => Promise<Response | Request | undefined> | Response | Request | undefined;
defaultCacheExpiry?: number;
default_cache_expiry?: number;
websocket?: WebSocketHandler<any>;
serverOptions?: Omit<Bun.Serve.Options<any>, "fetch" | "routes">;
server_options?: Omit<Bun.Serve.Options<any>, "fetch" | "routes">;
/**
* These are patterns in the pages to exclude
* from the router
*/
pages_exclude_patterns?: RegExp[];
};
export type BunextConfigMiddlewareParams = {
req: Request;