Skip to content

Commit

Permalink
fix: Fix node adpater requiring cloudflare dependencies (#35)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
barakcodes authored Nov 28, 2024
1 parent 2d861b6 commit cddd29e
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 6 deletions.
110 changes: 105 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
},
"dependencies": {
"@hono/vite-dev-server": "^0.17.0",
"@remix-run/server-runtime": "^2.15.0",
"remix-hono": "^0.0.16"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const handle = (userApp?: Hono, options?: Options) => {
app.all('*', async (c) => {
// @ts-expect-error it's not typed
const build = await import('virtual:remix/server-build')
const { createRequestHandler } = await import('@remix-run/cloudflare')
const { createRequestHandler } = await import('@remix-run/server-runtime')
const handler = createRequestHandler(build, 'development')

const getLoadContext = options?.getLoadContext ?? defaultGetLoadContext
Expand Down

0 comments on commit cddd29e

Please sign in to comment.