Skip to content

Commit cddd29e

Browse files
authored
fix: Fix node adpater requiring cloudflare dependencies (#35)
Rel #34 **Issue** Running the package with the node adapter, requires `@remix-run/cloudflare` **Fix** Replace the `@remix-run/cloudflare` with `@remix-run/server-runtime`, since it's dev env it shouldn't be much of an issue
1 parent 2d861b6 commit cddd29e

File tree

3 files changed

+107
-6
lines changed

3 files changed

+107
-6
lines changed

package-lock.json

Lines changed: 105 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
},
7474
"dependencies": {
7575
"@hono/vite-dev-server": "^0.17.0",
76+
"@remix-run/server-runtime": "^2.15.0",
7677
"remix-hono": "^0.0.16"
7778
},
7879
"peerDependencies": {

src/dev.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const handle = (userApp?: Hono, options?: Options) => {
1616
app.all('*', async (c) => {
1717
// @ts-expect-error it's not typed
1818
const build = await import('virtual:remix/server-build')
19-
const { createRequestHandler } = await import('@remix-run/cloudflare')
19+
const { createRequestHandler } = await import('@remix-run/server-runtime')
2020
const handler = createRequestHandler(build, 'development')
2121

2222
const getLoadContext = options?.getLoadContext ?? defaultGetLoadContext

0 commit comments

Comments
 (0)