-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
404 Not Found with useFetcher in only local #40
Comments
Code-Hex
changed the title
404 Not Found with useFetcher in only dev
404 Not Found with useFetcher in only local
Nov 30, 2024
Oh, I have probably found a solution, but I honestly don't know why this works. diff --git a/vite.config.ts b/vite.config.ts
index 14620e0..2c2f3be 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -7,6 +7,7 @@ import tsconfigPaths from "vite-tsconfig-paths";
import serverAdapter from "hono-remix-adapter/vite";
import { getLoadContext } from "./src/load-context";
import adapter from "@hono/vite-dev-server/cloudflare";
+import { defaultOptions } from "@hono/vite-dev-server";
declare module "@remix-run/node" {
interface Future {
@@ -31,6 +32,12 @@ export default defineConfig({
adapter,
getLoadContext,
entry: "src/api/index.ts",
+ exclude: [
+ ...defaultOptions.exclude,
+ "/assets/**",
+ "/app/**",
+ "/src/app/**",
+ ],
}),
tsconfigPaths(),
], If this was the intended specification for hono-remix-adapter and not a particular problem, it could be closed. |
@yusukebe Thank you so much! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Only in the local environment, a request using useFetcher to a resource route that only defines a loader will result in a 404 Not Found.
No error:
I have reproduction code for this:
https://github.com/Code-Hex/remix-test-fetch
The text was updated successfully, but these errors were encountered: