Skip to content

Commit 9d3ba9c

Browse files
authored
update dev plugin exclude regex to also parse backslashes (#106)
all good thanks!
1 parent eef269c commit 9d3ba9c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/dev.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,12 +273,12 @@ export function reactRouterHonoServer(options: ReactRouterHonoServerPluginOption
273273
export: options.dev?.export || "default",
274274
exclude: [
275275
new RegExp(
276-
`^(?=\\/${pluginConfig.appDirectory.replace(/^\/+|\/+$/g, "").replaceAll("/", "\\/")}\\/)((?!.*\\.data(\\?|$)).*\\..*(\\?.*)?$)`
276+
`^(?=\\/${pluginConfig.appDirectory.replace(/^[/\\]+|[/\\]+$/g, "").replaceAll(/[/\\]+/g, "/")}\\/)((?!.*\\.data(\\?|$)).*\\..*(\\?.*)?$)`
277277
),
278278
/\?import(\?.*)?$/,
279279
/^\/@.+$/,
280280
/^\/node_modules\/.*/,
281-
`/${pluginConfig.appDirectory}/**/.*/**`,
281+
`^(?=\\/${pluginConfig.appDirectory.replace(/^[/\\]+|[/\\]+$/g, "").replace(/[/\\]+/g, "/")}/**/.*/**)`,
282282
...(pluginConfig.dev?.exclude || []),
283283
],
284284
});

0 commit comments

Comments
 (0)