diff --git a/packages/webpack-plugin/lib/runtime/components/react/mpx-async-suspense.tsx b/packages/webpack-plugin/lib/runtime/components/react/mpx-async-suspense.tsx index f5da3bdbcb..cd7b4639d0 100644 --- a/packages/webpack-plugin/lib/runtime/components/react/mpx-async-suspense.tsx +++ b/packages/webpack-plugin/lib/runtime/components/react/mpx-async-suspense.tsx @@ -82,7 +82,8 @@ const DefaultFallback = ({ onReload }: DefaultFallbackProps) => { const DefaultLoading = () => { // eslint-disable-next-line @typescript-eslint/no-var-requires - const FastImage = require('@d11/react-native-fast-image') + const FastImageModule = require('@d11/react-native-fast-image') + const FastImage = FastImageModule.default || FastImageModule return ( = enableFastImage ? require('@d11/react-native-fast-image') : Image + let Component: React.ComponentType = Image + if (enableFastImage) { + // eslint-disable-next-line @typescript-eslint/no-var-requires + const fastImageModule = require('@d11/react-native-fast-image') + Component = fastImageModule.default || fastImageModule + } return createElement(Component, imageProps) }