From 89bc37c726f8c72632031484ff86a61052af4368 Mon Sep 17 00:00:00 2001 From: rphlmr Date: Tue, 14 Jan 2025 21:35:48 +0100 Subject: [PATCH] oups: export getPath function --- .gitignore | 1 + package.json | 2 +- src/http.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c2d3cd5..68241b9 100644 --- a/.gitignore +++ b/.gitignore @@ -132,4 +132,5 @@ dist .history .react-router /build +build .wrangler \ No newline at end of file diff --git a/package.json b/package.json index 6a83013..821d18a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-router-hono-server", - "version": "2.7.0", + "version": "2.7.1", "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/http.ts b/src/http.ts index 7ca780a..121dc78 100644 --- a/src/http.ts +++ b/src/http.ts @@ -65,6 +65,6 @@ export function redirect(c: Context, location: string) { * * If the path ends with `.data` (React Router Single Fetch query), it will be removed. */ -function getPath(c: Context) { +export function getPath(c: Context) { return c.req.path.replace(".data", ""); }