reactjs - NextJs Dynamic Import Spline - Stack Overflow

I have Dynamic imported Spline like this in the Nextjs projectconst DynamicSpline = dynamic(() => i

I have Dynamic imported Spline like this in the Nextjs project

const DynamicSpline = dynamic(() => import('@splinetool/react-spline'), {
  ssr: false,
  loading: () => (
    <div className="w-full h-full flex items-center justify-center bg-black opacity-50">
    </div>
  ),
});

and calling it like this

<DynamicSpline
  scene={splineFilePath}
  onLoad={() => {
  setIsSplineLoaded(true);
  }}
/>

While running the code I get this issue

./src/components/Home/HeroSection.tsx Module not found: Package path . is not exported from package C:\Users\karan\OneDrive\Desktop\solvejet\node_modules@splinetool\react-spline (see exports field in C:\Users\karan\OneDrive\Desktop\solvejet\node_modules@splinetool\react-spline\package.json)

Not sure what's the issue

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744175632a4561738.html

相关推荐

  • reactjs - NextJs Dynamic Import Spline - Stack Overflow

    I have Dynamic imported Spline like this in the Nextjs projectconst DynamicSpline = dynamic(() => i

    9天前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信