From d880dfb9488c624a85ded8a073d64d61a6fb980d Mon Sep 17 00:00:00 2001 From: Cody Bennett Date: Tue, 26 Dec 2023 02:35:15 -0600 Subject: [PATCH] Revert "fix(Text): lazy import Troika for Next issue (#1726)" This reverts commit a4da55745c23cb815d015e5a91026dc53cca2c4f. --- src/core/Text.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/core/Text.tsx b/src/core/Text.tsx index 55e38f2b0..e7669d13c 100644 --- a/src/core/Text.tsx +++ b/src/core/Text.tsx @@ -1,4 +1,6 @@ import * as React from 'react' +// @ts-ignore +import { Text as TextMeshImpl, preloadFont } from 'troika-three-text' import { ReactThreeFiber, useThree } from '@react-three/fiber' import { suspend } from 'suspend-react' import { ForwardRefComponent } from '../helpers/ts-utils' @@ -52,9 +54,6 @@ export const Text: ForwardRefComponent = /* @__PURE__ */ React.forwa }: Props, ref: React.ForwardedRef ) => { - // https://github.com/pmndrs/drei/issues/1725 - const { Text: TextMeshImpl, preloadFont } = suspend(async () => import('troika-three-text'), []) - const invalidate = useThree(({ invalidate }) => invalidate) const [troikaMesh] = React.useState(() => new TextMeshImpl())