Skip to content

Commit

Permalink
fix use client plugin on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
lazarv committed Aug 31, 2024
1 parent 53a5145 commit ad417f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-server/lib/plugins/use-client.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default function useClient(type, manifest) {
({ exported }) => exported?.name === "default"
))
)
? `export default function _default() { throw new Error("Attempted to call the default export of ${relative(cwd, id)} from the server but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); };
? `export default function _default() { throw new Error("Attempted to call the default export of ${sys.normalizePath(relative(cwd, id))} from the server but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); };
registerClientReference(_default, "${sys.normalizePath(relative(cwd, id))}", "default");`
: "";
const namedExports = ast.body
Expand Down

0 comments on commit ad417f4

Please sign in to comment.