Skip to content

Commit

Permalink
Fix: windows slash correction for rpc resolvers (#4269)
Browse files Browse the repository at this point in the history
* add slash to both absolute path and resolver import

* Update pr-release.yml

* pnpm lock fix

* fix

* Create slow-papayas-beam.md
  • Loading branch information
siddhsuresh authored Jan 4, 2024
1 parent 89d3d02 commit e8fd12e
Show file tree
Hide file tree
Showing 3 changed files with 118 additions and 112 deletions.
6 changes: 6 additions & 0 deletions .changeset/slow-papayas-beam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@blitzjs/rpc": patch
"blitz": patch
---

Fix: windows slash correction for rpc resolvers
4 changes: 2 additions & 2 deletions packages/blitz-rpc/src/server/loader/server/loader-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ export async function transformBlitzRpcServer(

const importStrategy = options?.resolversDynamicImport ? "import" : "require"

code += `__internal_addBlitzRpcResolver('${routePath}','${resolverFilePath}',() => ${importStrategy}('${slash(
code += `__internal_addBlitzRpcResolver('${routePath}','${slash(
resolverFilePath,
)}'));`
)}',() => ${importStrategy}('${slash(resolverFilePath)}'));`
code += "\n"
}

Expand Down
Loading

0 comments on commit e8fd12e

Please sign in to comment.