diff --git a/examples/node/custom-mount/app/routes/sub.tsx b/examples/node/custom-mount/app/routes/sub.tsx
index 6999d3d..cad0672 100644
--- a/examples/node/custom-mount/app/routes/sub.tsx
+++ b/examples/node/custom-mount/app/routes/sub.tsx
@@ -37,6 +37,7 @@ export default function Index({ loaderData: data }: Route.ComponentProps) {
setValue(e.target.value)} />
+
diff --git a/package.json b/package.json
index 7d328fb..2542cfd 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "react-router-hono-server",
- "version": "2.6.2",
+ "version": "2.6.3",
"type": "module",
"description": "The Vite plugin you need to create a Hono server for your React Router app in less than 10 seconds.",
"exports": {
diff --git a/src/dev.ts b/src/dev.ts
index 90d3dd5..00309a5 100644
--- a/src/dev.ts
+++ b/src/dev.ts
@@ -163,7 +163,9 @@ export function reactRouterHonoServer(options: ReactRouterHonoServerPluginOption
entry: pluginConfig.serverEntryPoint,
export: "default",
exclude: [
- /.*\.(ts|js|tsx|jsx|css|svg)(\?.*)?$/,
+ new RegExp(
+ `^(?=\\/${pluginConfig.appDirectory.replaceAll("/", "")}\\/)((?!.*\\.data(\\?|$)).*\\..*(\\\?.*)?$)`
+ ),
/\?import(\?.*)?$/,
/^\/@.+$/,
/^\/node_modules\/.*/,