tfjs: SelfieSegmentation is not a constructor
Hi,
Using vuejs3+vite+ts I am getting this error Uncaught (in promise) TypeError: jle.SelfieSegmentation is not a constructor

There was a discussion here https://github.com/vitejs/vite/issues/4680
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 16 (2 by maintainers)
I found the solution and I am putting it here just as a reference for any one who crosses path here.
vite.config
@Exlord your workaround work for me , can we use in production build
Yes, this is a build time enchantment, its perfectly safe for production, I am using it in production.
Hi, @Exlord
I apologize for the delayed response. After reviewing the issue mentioned in @Bersaelor comment, it appears that the issue is with the
MediaPipepackage. Please refer to this comment for more details. I would recommend posting this issue in theMediaPiperepo so that theMediaPipeteam can address it,please feel free to close this issue.If Am I missing something here please let me know ? Thank you!