Skip to content

Commit

Permalink
fix dev server file exclusion regex (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
rphlmr authored Jan 5, 2025
1 parent f9b1f72 commit e12d2ae
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions examples/node/custom-mount/app/routes/sub.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export default function Index({ loaderData: data }: Route.ComponentProps) {
</button>
<input />
<Input value={value} onChange={(e) => setValue(e.target.value)} />
<img src="/images/database.svg" alt="Database2" className="w-10" />
<div className="mt-8 w-full max-w-4xl overflow-x-auto">
<table className="w-full border-collapse bg-gray-100 shadow-md rounded-lg">
<thead>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
4 changes: 3 additions & 1 deletion src/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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\/.*/,
Expand Down

0 comments on commit e12d2ae

Please sign in to comment.