Skip to content

Commit

Permalink
Fix CallServerError import
Browse files Browse the repository at this point in the history
Another issue with barrel files.

We need to ensure that the internal import of `CallServerError` uses the
same import source as consumers would use it when importing it in their
client components.
  • Loading branch information
unstubbable committed Mar 15, 2024
1 parent 41748c1 commit 8a83ba3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/core/src/client/call-server.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Do not import CallServerError relatively. This must be the same import source
// as consumers would use it when importing it into their client components.
import {CallServerError} from '@mfng/core/client';
import type {ReactServerValue} from 'react-server-dom-webpack';
import ReactServerDOMClient from 'react-server-dom-webpack/client.browser';
import {CallServerError} from './call-server-error.js';

export async function callServer(
id: string,
Expand Down

0 comments on commit 8a83ba3

Please sign in to comment.