Skip to content

Commit f6c8ade

Browse files
fix(mdx): Use import * as to resolve configuration component ReferenceError in SSR
1 parent 3243435 commit f6c8ade

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/mdx-components.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Badge from './components/Badge/Badge';
22
import LinkComponent from './components/mdxComponents/Link';
33
import StackBlitzPreview from './components/StackBlitzPreview/StackBlitzPreview';
44
import CodeBlockWithCopy from './components/CodeBlockWithCopy/CodeBlockWithCopy';
5-
import { Mode, Node, W, I } from './components/Configuration/components';
5+
import * as ConfigComponents from './components/Configuration/components';
66

77
/** @returns {import('mdx/types.js').MDXComponents} */
88
export function useMDXComponents() {
@@ -11,9 +11,9 @@ export function useMDXComponents() {
1111
Badge: Badge,
1212
StackBlitzPreview: StackBlitzPreview,
1313
pre: CodeBlockWithCopy,
14-
Mode: Mode,
15-
Node: Node,
16-
W: W,
17-
I: I,
14+
Mode: ConfigComponents.Mode,
15+
Node: ConfigComponents.Node,
16+
W: ConfigComponents.W,
17+
I: ConfigComponents.I,
1818
};
1919
}

0 commit comments

Comments
 (0)